- React + Vite + Tailwind 프론트엔드 - Express + Sequelize + MariaDB 백엔드 - 넥슨 OAuth 2.0 인증 (캐릭터 목록 조회) - 주간 보스 결정석 수익 계산기 UI (리스트형) - Docker Compose + Caddy 리버스 프록시 설정 - 보스/난이도 이미지 에셋 포함 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
21 lines
1 KiB
JavaScript
21 lines
1 KiB
JavaScript
import { User } from './User.js';
|
|
import { UserCharacter } from './UserCharacter.js';
|
|
import { Boss } from './boss/Boss.js';
|
|
import { BossDifficulty } from './boss/BossDifficulty.js';
|
|
import { UserBossSelection } from './boss/UserBossSelection.js';
|
|
|
|
// User <-> UserCharacter
|
|
User.hasMany(UserCharacter, { foreignKey: 'user_id', as: 'characters' });
|
|
UserCharacter.belongsTo(User, { foreignKey: 'user_id' });
|
|
|
|
// Boss <-> BossDifficulty
|
|
Boss.hasMany(BossDifficulty, { foreignKey: 'boss_id', as: 'difficulties' });
|
|
BossDifficulty.belongsTo(Boss, { foreignKey: 'boss_id' });
|
|
|
|
// UserBossSelection 관계
|
|
UserBossSelection.belongsTo(User, { foreignKey: 'user_id' });
|
|
UserBossSelection.belongsTo(UserCharacter, { foreignKey: 'user_character_id', as: 'character' });
|
|
UserBossSelection.belongsTo(BossDifficulty, { foreignKey: 'boss_difficulty_id', as: 'difficulty' });
|
|
UserCharacter.hasMany(UserBossSelection, { foreignKey: 'user_character_id', as: 'selections' });
|
|
|
|
export { User, UserCharacter, Boss, BossDifficulty, UserBossSelection };
|