2026-04-13 16:01:04 +09:00
|
|
|
import { DataTypes } from 'sequelize';
|
|
|
|
|
import { sequelize } from '../../lib/db.js';
|
2026-04-21 20:31:43 +09:00
|
|
|
import { DIFFICULTIES } from '../../constants.js';
|
2026-04-13 16:01:04 +09:00
|
|
|
|
|
|
|
|
export const BossCrystalBossDifficulty = sequelize.define('BossCrystalBossDifficulty', {
|
|
|
|
|
id: { type: DataTypes.INTEGER, autoIncrement: true, primaryKey: true },
|
|
|
|
|
boss_id: { type: DataTypes.INTEGER, allowNull: false },
|
|
|
|
|
difficulty: {
|
2026-04-21 20:31:43 +09:00
|
|
|
type: DataTypes.ENUM(...DIFFICULTIES),
|
2026-04-13 16:01:04 +09:00
|
|
|
allowNull: false,
|
|
|
|
|
},
|
|
|
|
|
crystal_price: { type: DataTypes.BIGINT, allowNull: false },
|
|
|
|
|
}, {
|
|
|
|
|
tableName: 'bc_boss_difficulties',
|
|
|
|
|
underscored: true,
|
|
|
|
|
timestamps: false,
|
|
|
|
|
indexes: [
|
|
|
|
|
{ unique: true, fields: ['boss_id', 'difficulty'] },
|
|
|
|
|
],
|
|
|
|
|
});
|