Created the Channel.ts model
This commit is contained in:
parent
5be50f881b
commit
8d7681ae97
46
models/Channel.ts
Normal file
46
models/Channel.ts
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
import {sequelize} from "../app";
|
||||||
|
import {DataTypes, InferAttributes, InferCreationAttributes, Model} from "sequelize";
|
||||||
|
|
||||||
|
export interface IChannel extends Model<InferAttributes<IChannel>, InferCreationAttributes<IChannel>> {
|
||||||
|
guildId: number
|
||||||
|
clientId: number
|
||||||
|
webhookToken: string
|
||||||
|
langCode: string
|
||||||
|
emotes: number
|
||||||
|
designId: number
|
||||||
|
topicId: number
|
||||||
|
cachedName: string
|
||||||
|
}
|
||||||
|
|
||||||
|
const ChannelSchema = sequelize.define<IChannel>('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;
|
Loading…
x
Reference in New Issue
Block a user