ztavern/node-server-manager/Lib/Models/NSMPlayerStatHistory.js
2024-10-18 00:19:19 +00:00

39 lines
No EOL
1 KiB
JavaScript

module.exports = (sequelize, DataTypes) => {
const NSMPlayerStatHistory = sequelize.define('NSMPlayerStatHistory',
{
Id: {
type: DataTypes.INTEGER,
autoIncrement: true,
allowNull: false,
primaryKey: true
},
ClientId: {
type: DataTypes.INTEGER,
allowNull: false,
references: {
model: 'NSMClients',
key: 'ClientId'
}
},
TotalPerformance: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: 100,
},
Performance: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: 100,
},
Date: {
type: DataTypes.DATE,
allowNull: false,
defaultValue: DataTypes.literal('CURRENT_TIMESTAMP'),
}
}, {
timestamps: false,
freezeTableName: true
})
NSMPlayerStatHistory.sync()
return NSMPlayerStatHistory
}