diff --git a/models/Achievement.ts b/models/Achievement.ts new file mode 100644 index 0000000..0ef830a --- /dev/null +++ b/models/Achievement.ts @@ -0,0 +1,25 @@ +import {DataTypes, InferAttributes, InferCreationAttributes, Model} from "sequelize"; +import {sequelize} from "../app"; + +export interface IAchievement extends Model, InferCreationAttributes> { + guildId: number + categoryId: number + achievementId: number +} + +const AchievementSchema = sequelize.define('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; \ No newline at end of file