forked from spacebar/SplatNet-Backend
Implement rankCalc
This commit is contained in:
parent
8363559721
commit
951d1b3c03
2 changed files with 80 additions and 0 deletions
40
judd/models/playerRank.js
Normal file
40
judd/models/playerRank.js
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
const { DataTypes } = require('sequelize');
|
||||
const { connection } = require('../database');
|
||||
|
||||
const PlayerRank = connection.define('PlayerRank', {
|
||||
PId: {
|
||||
type: DataTypes.BIGINT,
|
||||
primaryKey: true,
|
||||
allowNull: false
|
||||
},
|
||||
GameMode: {
|
||||
type: DataTypes.INTEGER,
|
||||
primaryKey: true,
|
||||
allowNull: false
|
||||
},
|
||||
MiiName: {
|
||||
type: DataTypes.STRING,
|
||||
allowNull: true
|
||||
},
|
||||
Rank: {
|
||||
type: DataTypes.INTEGER,
|
||||
defaultValue: 0
|
||||
},
|
||||
WinSum: {
|
||||
type: DataTypes.INTEGER,
|
||||
defaultValue: 0
|
||||
},
|
||||
LoseSum: {
|
||||
type: DataTypes.INTEGER,
|
||||
defaultValue: 0
|
||||
},
|
||||
RankingScore: {
|
||||
type: DataTypes.FLOAT,
|
||||
defaultValue: 0.0
|
||||
}
|
||||
}, {
|
||||
tableName: 'player_ranks',
|
||||
timestamps: true
|
||||
});
|
||||
|
||||
module.exports = { PlayerRank };
|
||||
Loading…
Reference in a new issue