maplestory/backend/models/boss-crystal/BossDifficulty.js
caadiq b3907ec48f 공용 상수 backend/constants.js로 추출
DIFFICULTIES(난이도 enum), PARTY_SIZE(1~6), SYMBOL_MASTER_LEVEL(2~99),
UPLOAD_FILE_SIZE_LIMIT(10MB)를 backend/constants.js로 추출하고 admin.js,
boss-crystal.js, symbol.js, BossDifficulty 모델에서 참조.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-21 20:31:43 +09:00

20 lines
669 B
JavaScript

import { DataTypes } from 'sequelize';
import { sequelize } from '../../lib/db.js';
import { DIFFICULTIES } from '../../constants.js';
export const BossCrystalBossDifficulty = sequelize.define('BossCrystalBossDifficulty', {
id: { type: DataTypes.INTEGER, autoIncrement: true, primaryKey: true },
boss_id: { type: DataTypes.INTEGER, allowNull: false },
difficulty: {
type: DataTypes.ENUM(...DIFFICULTIES),
allowNull: false,
},
crystal_price: { type: DataTypes.BIGINT, allowNull: false },
}, {
tableName: 'bc_boss_difficulties',
underscored: true,
timestamps: false,
indexes: [
{ unique: true, fields: ['boss_id', 'difficulty'] },
],
});