오류 수정, 통계 보강

This commit is contained in:
2025-06-08 20:21:37 +09:00
parent 1a3706d7a5
commit 141a0de6d0
42 changed files with 2645 additions and 799 deletions
+9 -4
View File
@@ -28,9 +28,9 @@ const Event = sequelize.define('Event', {
comment: '이벤트 설명'
},
eventType: {
type: DataTypes.ENUM('정기전', '번개', '연습', '교류전', '이벤트', '기타'),
type: DataTypes.ENUM('regular', 'lightning', 'practice', 'exchange', 'event', 'other'),
allowNull: false,
defaultValue: '정기전',
defaultValue: 'regular',
comment: '이벤트 유형'
},
publicHash: {
@@ -88,9 +88,9 @@ const Event = sequelize.define('Event', {
comment: '참가자 수'
},
status: {
type: DataTypes.ENUM('준비', '활성', '완료', '취소', '삭제'),
type: DataTypes.ENUM('ready', 'active', 'completed', 'canceled', 'deleted'),
allowNull: false,
defaultValue: '활성',
defaultValue: 'active',
comment: '이벤트 상태'
},
createdAt: {
@@ -122,6 +122,11 @@ Event.associate = (models) => {
Event.hasMany(models.EventScore, {
foreignKey: 'eventId'
});
// 팀 연관관계 추가
Event.hasMany(models.EventTeam, {
foreignKey: 'eventId'
});
};
module.exports = Event;