모델 코멘트 입력

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
+11 -5
View File
@@ -7,7 +7,8 @@ ActivityLog.init({
id: {
type: DataTypes.INTEGER.UNSIGNED,
primaryKey: true,
autoIncrement: true
autoIncrement: true,
comment: '활동 로그 고유 식별자'
},
userId: {
type: DataTypes.INTEGER.UNSIGNED,
@@ -15,22 +16,27 @@ ActivityLog.init({
references: {
model: 'Users',
key: 'id'
}
},
comment: '유저 ID'
},
type: {
type: DataTypes.STRING(50),
allowNull: false
allowNull: false,
comment: '로그 유형'
},
description: {
type: DataTypes.TEXT,
allowNull: true
allowNull: true,
comment: '상세 설명'
},
createdAt: {
type: DataTypes.DATE,
defaultValue: DataTypes.NOW
defaultValue: DataTypes.NOW,
comment: '생성일'
}
}, {
sequelize,
comment: '유저 활동 로그를 저장하는 테이블',
modelName: 'ActivityLog',
tableName: 'ActivityLogs',
timestamps: true,