오류 수정, 통계 보강

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
+4 -14
View File
@@ -41,15 +41,15 @@ const EventParticipant = sequelize.define('EventParticipant', {
comment: '비고'
},
status: {
type: DataTypes.ENUM('참가예정', '참가확정', '취소'),
type: DataTypes.ENUM('pending', 'confirmed', 'canceled'),
allowNull: false,
defaultValue: '참가예정',
defaultValue: 'pending',
comment: '참가 상태'
},
paymentStatus: {
type: DataTypes.ENUM('미납', '납부완료'),
type: DataTypes.ENUM('unpaid', 'paid'),
allowNull: false,
defaultValue: '미납',
defaultValue: 'unpaid',
comment: '참가비 납부 상태'
}
}, {
@@ -70,25 +70,15 @@ EventParticipant.associate = (models) => {
EventParticipant.belongsTo(models.Event, {
foreignKey: 'eventId'
});
EventParticipant.belongsTo(models.Member, {
foreignKey: 'memberId'
});
EventParticipant.belongsTo(models.EventTeam, {
foreignKey: 'teamId'
});
EventParticipant.hasMany(models.EventScore, {
foreignKey: 'participantId'
});
};
EventParticipant.associate = (models) => {
EventParticipant.hasMany(models.EventScore, {
foreignKey: 'participantId'
});
EventParticipant.belongsTo(models.Member, { foreignKey: 'memberId' });
};
module.exports = EventParticipant;