오류 수정, 통계 보강
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user