refactor platform domain states and permissions

This commit is contained in:
david
2026-07-29 14:25:38 +08:00
parent d4799cd320
commit 35a52c4b06
42 changed files with 507 additions and 364 deletions

View File

@@ -4,11 +4,11 @@ import "git.apinb.com/bsm-sdk/core/database"
// PlatformRole 对应 platform_role定义平台总后台的数据范围与菜单权限角色。
type PlatformRole struct {
Entity // 公共实体字段
RoleCode string `gorm:"column:role_code;type:varchar(64);not null;uniqueIndex" json:"role_code"` // 角色编码
Name string `gorm:"column:name;type:varchar(64);not null" json:"name"` // 角色名称
DataScope string `gorm:"column:data_scope;type:varchar(32);not null;default:'global'" json:"data_scope"` // 数据权限范围
IsSystem bool `gorm:"column:is_system;not null;default:false" json:"is_system"` // 是否系统内置角色
Entity // 公共实体字段
RoleCode string `gorm:"column:role_code;type:varchar(64);not null;uniqueIndex" json:"role_code"` // 角色编码
Name string `gorm:"column:name;type:varchar(64);not null" json:"name"` // 角色名称
LocationScope string `gorm:"column:location_scope;type:varchar(32);not null;default:'standard'" json:"location_scope"` // 坐标展示范围
IsSystem bool `gorm:"column:is_system;not null;default:false" json:"is_system"` // 是否系统内置角色
}
func init() { database.AppendMigrate(&PlatformRole{}) }