모델 코멘트 입력

This commit is contained in:
2025-04-26 08:04:04 +09:00
parent d1b22d4272
commit 283c8a7f4a
18 changed files with 293 additions and 140 deletions
+33 -16
View File
@@ -5,7 +5,8 @@ const Event = sequelize.define('Event', {
id: {
type: DataTypes.INTEGER.UNSIGNED,
primaryKey: true,
autoIncrement: true
autoIncrement: true,
comment: '이벤트 고유 식별자'
},
clubId: {
type: DataTypes.INTEGER.UNSIGNED,
@@ -13,72 +14,88 @@ const Event = sequelize.define('Event', {
references: {
model: 'Clubs',
key: 'id'
}
},
comment: '소속 클럽 ID'
},
title: {
type: DataTypes.STRING,
allowNull: false
allowNull: false,
comment: '이벤트 제목'
},
description: {
type: DataTypes.TEXT,
allowNull: true
allowNull: true,
comment: '이벤트 설명'
},
eventType: {
type: DataTypes.ENUM('정기전', '번개', '연습', '교류전', '이벤트', '기타'),
allowNull: false,
defaultValue: '정기전'
defaultValue: '정기전',
comment: '이벤트 유형'
},
startDate: {
type: DataTypes.DATE,
allowNull: false
allowNull: false,
comment: '시작일'
},
endDate: {
type: DataTypes.DATE,
allowNull: true
allowNull: true,
comment: '종료일'
},
location: {
type: DataTypes.STRING,
allowNull: true
allowNull: true,
comment: '장소'
},
gameCount: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: 3
defaultValue: 3,
comment: '게임 수'
},
participantFee: {
type: DataTypes.DECIMAL(10, 2),
allowNull: false,
defaultValue: 0
defaultValue: 0,
comment: '참가비'
},
maxParticipants: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: 0
defaultValue: 0,
comment: '최대 참가 인원'
},
registrationDeadline: {
type: DataTypes.DATE,
allowNull: true
allowNull: true,
comment: '참가 신청 마감일'
},
participantCount: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: 0
defaultValue: 0,
comment: '참가자 수'
},
status: {
type: DataTypes.ENUM('준비', '활성', '완료', '취소', '삭제'),
allowNull: false,
defaultValue: '활성'
defaultValue: '활성',
comment: '이벤트 상태'
},
createdAt: {
type: DataTypes.DATE,
allowNull: false
allowNull: false,
comment: '생성일'
},
updatedAt: {
type: DataTypes.DATE,
allowNull: false
allowNull: false,
comment: '수정일'
}
}, {
tableName: 'Events',
comment: '클럽 내 이벤트(대회, 모임 등) 정보를 저장하는 테이블',
timestamps: true
});