Implement rankCalc

This commit is contained in:
kittentm 2026-03-21 23:25:05 +01:00
commit 951d1b3c03
No known key found for this signature in database
GPG key ID: AC43DFDBC1F44A91
2 changed files with 80 additions and 0 deletions

40
judd/models/playerRank.js Normal file
View 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 };