Created the Achievement.ts model
This commit is contained in:
parent
5851d74798
commit
8ef5e66bd4
25
models/Achievement.ts
Normal file
25
models/Achievement.ts
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
import {DataTypes, InferAttributes, InferCreationAttributes, Model} from "sequelize";
|
||||||
|
import {sequelize} from "../app";
|
||||||
|
|
||||||
|
export interface IAchievement extends Model<InferAttributes<IAchievement>, InferCreationAttributes<IAchievement>> {
|
||||||
|
guildId: number
|
||||||
|
categoryId: number
|
||||||
|
achievementId: number
|
||||||
|
}
|
||||||
|
|
||||||
|
const AchievementSchema = sequelize.define<IAchievement>('achievements', {
|
||||||
|
guildId: {
|
||||||
|
type: DataTypes.BIGINT,
|
||||||
|
allowNull: false
|
||||||
|
},
|
||||||
|
categoryId: {
|
||||||
|
type: DataTypes.INTEGER,
|
||||||
|
allowNull: false
|
||||||
|
},
|
||||||
|
achievementId: {
|
||||||
|
type: DataTypes.INTEGER,
|
||||||
|
allowNull: false
|
||||||
|
}
|
||||||
|
}, {createdAt: false, updatedAt: false});
|
||||||
|
|
||||||
|
export const Achievement = AchievementSchema;
|
Loading…
x
Reference in New Issue
Block a user