修改角色删除逻辑,有用户占用状态的角色禁止删除

This commit is contained in:
piexlmax
2022-01-20 15:38:21 +08:00
parent dbf45502d1
commit c5b96954bf
5 changed files with 856 additions and 94 deletions
+1
View File
@@ -14,5 +14,6 @@ type SysAuthority struct {
DataAuthorityId []SysAuthority `json:"dataAuthorityId" gorm:"many2many:sys_data_authority_id"`
Children []SysAuthority `json:"children" gorm:"-"`
SysBaseMenus []SysBaseMenu `json:"menus" gorm:"many2many:sys_authority_menus;"`
Users []SysUser `json:"-" gorm:"many2many:sys_user_authority;"`
DefaultRouter string `json:"defaultRouter" gorm:"comment:默认菜单;default:dashboard"` // 默认菜单(默认dashboard)
}