From 78ec0510b99a7f7bc1d9b15cf8fe28a38ed7c97a Mon Sep 17 00:00:00 2001 From: Mathias Wagner Date: Thu, 9 Nov 2023 07:56:43 +0100 Subject: [PATCH] Created the Guild.ts model --- models/Guild.ts | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 models/Guild.ts diff --git a/models/Guild.ts b/models/Guild.ts new file mode 100644 index 0000000..a89641f --- /dev/null +++ b/models/Guild.ts @@ -0,0 +1,23 @@ +import {sequelize} from "../app"; +import {DataTypes, InferAttributes, InferCreationAttributes, Model} from "sequelize"; + +export interface IGuild extends Model, InferCreationAttributes> { + guildId: number + language: string + coins: number +} + +const GuildSchema = sequelize.define('guilds', { + guildId: { + type: DataTypes.BIGINT, + allowNull: false + }, + language: { + type: DataTypes.STRING + }, + coins: { + type: DataTypes.INTEGER + } +}, {createdAt: false, updatedAt: false}); + +export const Guild = GuildSchema; \ No newline at end of file