You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
1.6 KiB

6 months ago
package model
import "bkb-seller/global"
type SysAuthority struct {
global.TIME_MODEL
Organization string `gorm:"size:50;comment:组织" json:"organization" ` // 组织
Appid string `gorm:"size:50;comment:应用ID" json:"appid" ` // 应用ID
Type string `gorm:"size:50;comment:类型" json:"type" ` // 类型 admin-运营端 seller-商家端
AuthorityId uint `json:"authorityId" gorm:"primary_key;AUTO_INCREMENT;comment:角色ID;size:90"` // 角色ID
AuthorityName string `json:"authorityName" gorm:"type:varchar(100);comment:角色名"` // 角色名
AuthorityDesc string `json:"authorityDesc" gorm:"type:varchar(255);comment:角色描述"` // 角色描述
ParentId string `json:"parentId" gorm:"size:90;comment:父角色ID"` // 父角色ID
Children []SysAuthority `json:"children" gorm:"-"`
SysBaseMenus []SysBaseMenu `json:"menus" gorm:"many2many:sys_authority_menus;"`
DefaultRouter string `json:"defaultRouter" gorm:"comment:默认菜单;default:dashboard"` // 默认菜单(默认dashboard)
}
type SysAuthoritySimple struct {
AuthorityId string `json:"authorityId" gorm:"not null;unique;primary_key;comment:角色ID;size:90"` // 角色ID
AuthorityName string `json:"authorityName" gorm:"type:varchar(100);comment:角色名"` // 角色名
}
func (SysAuthoritySimple) TableName() string {
return "sys_authorities"
}