모델 코멘트 입력

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
+15 -7
View File
@@ -5,7 +5,8 @@ const ClubSubscription = sequelize.define('ClubSubscription', {
id: {
type: DataTypes.INTEGER.UNSIGNED,
primaryKey: true,
autoIncrement: true
autoIncrement: true,
comment: '클럽-구독 연결 고유 식별자'
},
clubId: {
type: DataTypes.INTEGER.UNSIGNED,
@@ -13,7 +14,8 @@ const ClubSubscription = sequelize.define('ClubSubscription', {
references: {
model: 'Clubs',
key: 'id'
}
},
comment: '클럽 ID'
},
planId: {
type: DataTypes.INTEGER.UNSIGNED,
@@ -21,28 +23,34 @@ const ClubSubscription = sequelize.define('ClubSubscription', {
references: {
model: 'SubscriptionPlans',
key: 'id'
}
},
comment: '구독 플랜 ID'
},
status: {
type: DataTypes.ENUM('active', 'expired', 'suspended'),
defaultValue: 'active',
allowNull: false
allowNull: false,
comment: '구독 상태'
},
startDate: {
type: DataTypes.DATE,
allowNull: false
allowNull: false,
comment: '구독 시작일'
},
endDate: {
type: DataTypes.DATE,
allowNull: false
allowNull: false,
comment: '구독 종료일'
},
price: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: 0
defaultValue: 0,
comment: '구독 가격'
}
}, {
tableName: 'ClubSubscriptions',
comment: '클럽별 구독 정보(플랜 등)를 저장하는 테이블',
timestamps: true
});