package models 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"` // 角色名称 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{}) } // TableName 返回与模型、文件名一致的单数数据表名。 func (table *PlatformRole) TableName() string { return "platform_role" }