- 모델 2개 추가: Symbol (type/region/image/max_level/daily_default/weekly_default/sort_order) + SymbolLevel (symbol_id/level/required_count/meso_cost) - /admin/symbol 라우트와 심볼 목록/편집 UI (결정석 관리 스타일 차용) - 심볼 목록 dnd-kit 드래그앤드랍 순서 변경 - 심볼 폼: 이미지 업로더, 종류/지역 입력, 만렙·일퀘·주간퀘 입력 - 레벨별 필요 개수/메소 테이블 (만렙에 따라 행 자동 조정) - 메소 입력 쉼표 포매팅 + "N억 N,NNN만" 한글 요약 (amber, 고정 높이) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
23 lines
902 B
JavaScript
23 lines
902 B
JavaScript
import { DataTypes } from 'sequelize';
|
|
import { sequelize } from '../../lib/db.js';
|
|
|
|
export const Symbol = sequelize.define('Symbol', {
|
|
id: { type: DataTypes.INTEGER, autoIncrement: true, primaryKey: true },
|
|
type: {
|
|
type: DataTypes.ENUM('아케인', '어센틱', '그랜드 어센틱'),
|
|
allowNull: false,
|
|
},
|
|
region: { type: DataTypes.STRING(32), allowNull: false },
|
|
image: { type: DataTypes.STRING(255), allowNull: true },
|
|
max_level: { type: DataTypes.TINYINT, allowNull: false },
|
|
daily_default: { type: DataTypes.SMALLINT, allowNull: false, defaultValue: 0 },
|
|
weekly_default: { type: DataTypes.SMALLINT, allowNull: false, defaultValue: 0 },
|
|
sort_order: { type: DataTypes.INTEGER, allowNull: false, defaultValue: 0 },
|
|
}, {
|
|
tableName: 'sym_symbols',
|
|
underscored: true,
|
|
indexes: [
|
|
{ unique: true, fields: ['type', 'region'] },
|
|
{ fields: ['sort_order'] },
|
|
],
|
|
});
|