Created the Guild.ts model

This commit is contained in:
Mathias Wagner 2023-11-09 07:56:43 +01:00
parent 8d7681ae97
commit 78ec0510b9
Signed by: Mathias
GPG Key ID: B8DC354B0A1F5B44

23
models/Guild.ts Normal file
View File

@ -0,0 +1,23 @@
import {sequelize} from "../app";
import {DataTypes, InferAttributes, InferCreationAttributes, Model} from "sequelize";
export interface IGuild extends Model<InferAttributes<IGuild>, InferCreationAttributes<IGuild>> {
guildId: number
language: string
coins: number
}
const GuildSchema = sequelize.define<IGuild>('guilds', {
guildId: {
type: DataTypes.BIGINT,
allowNull: false
},
language: {
type: DataTypes.STRING
},
coins: {
type: DataTypes.INTEGER
}
}, {createdAt: false, updatedAt: false});
export const Guild = GuildSchema;