Updated the Guild.ts model

This commit is contained in:
Mathias Wagner 2023-11-12 18:19:50 +01:00
parent a7e0f00e75
commit 84494849f8
Signed by: Mathias
GPG Key ID: B8DC354B0A1F5B44

View File

@ -3,8 +3,10 @@ import {DataTypes, InferAttributes, InferCreationAttributes, Model} from "sequel
export interface IGuild extends Model<InferAttributes<IGuild>, InferCreationAttributes<IGuild>> {
guildId: number
emotes: number
language: string
coins: number
messagesSent: number
}
const GuildSchema = sequelize.define<IGuild>('guilds', {
@ -16,8 +18,16 @@ const GuildSchema = sequelize.define<IGuild>('guilds', {
language: {
type: DataTypes.STRING
},
emotes: {
type: DataTypes.INTEGER,
defaultValue: 0
},
coins: {
type: DataTypes.INTEGER
},
messagesSent: {
type: DataTypes.INTEGER,
defaultValue: 0
}
}, {createdAt: false, updatedAt: false});