Created the Guild.ts model
This commit is contained in:
parent
8d7681ae97
commit
78ec0510b9
23
models/Guild.ts
Normal file
23
models/Guild.ts
Normal 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;
|
Loading…
x
Reference in New Issue
Block a user