refactor platform menus and entity statuses

This commit is contained in:
david
2026-07-29 13:18:52 +08:00
parent 978dc446d9
commit afd9dbdeb5
48 changed files with 510 additions and 421 deletions

View File

@@ -6,12 +6,12 @@ import (
"git.apinb.com/bsm-sdk/core/database"
)
// PlatformRoleMenu 对应 platform_role_menu记录角色拥有的菜单权限。
// PlatformRoleMenu 对应 platform_role_menu记录角色拥有的静态菜单权限。
type PlatformRoleMenu struct {
ID uint64 `gorm:"column:id;primaryKey;autoIncrement" json:"id"` // 数据库自增主键
PlatformRoleID uint64 `gorm:"column:platform_role_id;not null;uniqueIndex:uk_platform_role_menu" json:"platform_role_id"` // 角色自增主键
PlatformMenuID uint64 `gorm:"column:platform_menu_id;not null;uniqueIndex:uk_platform_role_menu" json:"platform_menu_id"` // 菜单自增主键
CreatedAt time.Time `gorm:"column:created_at;type:timestamptz;not null" json:"created_at"` // 创建时间
ID uint64 `gorm:"column:id;primaryKey;autoIncrement" json:"id"` // 数据库自增主键
PlatformRoleID uint64 `gorm:"column:platform_role_id;not null;uniqueIndex:uk_platform_role_menu" json:"platform_role_id"` // 角色自增主键
MenuCode string `gorm:"column:menu_code;type:varchar(64);not null;uniqueIndex:uk_platform_role_menu" json:"menu_code"` // 静态菜单编码
CreatedAt time.Time `gorm:"column:created_at;type:timestamptz;not null" json:"created_at"` // 创建时间
}
func init() { database.AppendMigrate(&PlatformRoleMenu{}) }