From 8d7681ae97d623ffda48d812f8feb2c758d31c60 Mon Sep 17 00:00:00 2001 From: Mathias Wagner Date: Thu, 9 Nov 2023 07:56:34 +0100 Subject: [PATCH] Created the Channel.ts model --- models/Channel.ts | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 models/Channel.ts diff --git a/models/Channel.ts b/models/Channel.ts new file mode 100644 index 0000000..5df594d --- /dev/null +++ b/models/Channel.ts @@ -0,0 +1,46 @@ +import {sequelize} from "../app"; +import {DataTypes, InferAttributes, InferCreationAttributes, Model} from "sequelize"; + +export interface IChannel extends Model, InferCreationAttributes> { + guildId: number + clientId: number + webhookToken: string + langCode: string + emotes: number + designId: number + topicId: number + cachedName: string +} + +const ChannelSchema = sequelize.define('channels', { + guildId: { + type: DataTypes.BIGINT, + allowNull: false + }, + clientId: { + type: DataTypes.BIGINT, + allowNull: false + }, + webhookToken: { + type: DataTypes.STRING, + allowNull: false + }, + langCode: { + type: DataTypes.STRING, + allowNull: false + }, + emotes: { + type: DataTypes.BIGINT + }, + designId: { + type: DataTypes.INTEGER + }, + topicId: { + type: DataTypes.INTEGER + }, + cachedName: { + type: DataTypes.STRING + } +}, {createdAt: false, updatedAt: false}); + +export const Channel = ChannelSchema; \ No newline at end of file