모델 코멘트 입력
This commit is contained in:
+24
-15
@@ -5,7 +5,8 @@ const Menu = sequelize.define('Menu', {
|
||||
id: {
|
||||
type: DataTypes.INTEGER.UNSIGNED,
|
||||
primaryKey: true,
|
||||
autoIncrement: true
|
||||
autoIncrement: true,
|
||||
comment: '메뉴 고유 식별자'
|
||||
},
|
||||
parentId: {
|
||||
type: DataTypes.INTEGER.UNSIGNED,
|
||||
@@ -13,19 +14,23 @@ const Menu = sequelize.define('Menu', {
|
||||
references: {
|
||||
model: 'Menus', // 실제 테이블명
|
||||
key: 'id'
|
||||
}
|
||||
},
|
||||
comment: '상위 메뉴 ID'
|
||||
},
|
||||
title: {
|
||||
type: DataTypes.STRING,
|
||||
allowNull: false
|
||||
allowNull: false,
|
||||
comment: '메뉴명'
|
||||
},
|
||||
icon: {
|
||||
type: DataTypes.STRING,
|
||||
allowNull: true
|
||||
allowNull: true,
|
||||
comment: '아이콘'
|
||||
},
|
||||
to: {
|
||||
type: DataTypes.STRING,
|
||||
allowNull: false
|
||||
allowNull: false,
|
||||
comment: '라우팅 경로'
|
||||
},
|
||||
featureCode: {
|
||||
type: DataTypes.STRING,
|
||||
@@ -33,37 +38,41 @@ const Menu = sequelize.define('Menu', {
|
||||
references: {
|
||||
model: 'Features',
|
||||
key: 'code'
|
||||
}
|
||||
},
|
||||
requiredSubscriptionTier: {
|
||||
type: DataTypes.ENUM('basic', 'standard', 'premium'),
|
||||
allowNull: true
|
||||
},
|
||||
comment: '연결된 기능 코드'
|
||||
},
|
||||
|
||||
role: {
|
||||
type: DataTypes.STRING,
|
||||
allowNull: false,
|
||||
defaultValue: 'user'
|
||||
defaultValue: 'user',
|
||||
comment: '권한 역할'
|
||||
},
|
||||
order: {
|
||||
type: DataTypes.INTEGER,
|
||||
allowNull: false,
|
||||
defaultValue: 0
|
||||
defaultValue: 0,
|
||||
comment: '정렬 순서'
|
||||
},
|
||||
visible: {
|
||||
type: DataTypes.BOOLEAN,
|
||||
allowNull: false,
|
||||
defaultValue: true
|
||||
defaultValue: true,
|
||||
comment: '표시 여부'
|
||||
},
|
||||
createdAt: {
|
||||
type: DataTypes.DATE,
|
||||
allowNull: false
|
||||
allowNull: false,
|
||||
comment: '생성일'
|
||||
},
|
||||
updatedAt: {
|
||||
type: DataTypes.DATE,
|
||||
allowNull: false
|
||||
allowNull: false,
|
||||
comment: '수정일'
|
||||
}
|
||||
}, {
|
||||
tableName: 'Menus',
|
||||
comment: '서비스 내 메뉴 구조 및 정보를 저장하는 테이블',
|
||||
timestamps: true
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user