모델 코멘트 입력

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
+21 -10
View File
@@ -5,15 +5,18 @@ const Club = sequelize.define('Club', {
id: {
type: DataTypes.INTEGER.UNSIGNED,
primaryKey: true,
autoIncrement: true
autoIncrement: true,
comment: '클럽 고유 식별자'
},
name: {
type: DataTypes.STRING,
allowNull: false
allowNull: false,
comment: '클럽명'
},
description: {
type: DataTypes.TEXT,
allowNull: true
allowNull: true,
comment: '클럽 설명'
},
ownerId: {
type: DataTypes.INTEGER.UNSIGNED,
@@ -21,36 +24,44 @@ const Club = sequelize.define('Club', {
references: {
model: 'Users',
key: 'id'
}
},
comment: '클럽장(소유자) 유저 ID'
},
location: {
type: DataTypes.STRING,
allowNull: true
allowNull: true,
comment: '주 활동 지역'
},
contact: {
type: DataTypes.STRING,
allowNull: true
allowNull: true,
comment: '연락처'
},
status: {
type: DataTypes.ENUM('active', 'inactive', 'suspended'),
allowNull: false,
defaultValue: 'active'
defaultValue: 'active',
comment: '클럽 상태'
},
memberCount: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: 0
defaultValue: 0,
comment: '회원 수'
},
createdAt: {
type: DataTypes.DATE,
allowNull: false
allowNull: false,
comment: '생성일'
},
updatedAt: {
type: DataTypes.DATE,
allowNull: false
allowNull: false,
comment: '수정일'
}
}, {
tableName: 'Clubs',
comment: '볼링 클럽 정보를 저장하는 테이블',
timestamps: true
});