修复无法将子角色重置修改为根角色的bug

This commit is contained in:
piexlmax
2022-10-29 20:26:45 +08:00
parent e46eecfc8e
commit c300e16de9
5 changed files with 104 additions and 127 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ type SysAuthority struct {
DeletedAt *time.Time `sql:"index"`
AuthorityId uint `json:"authorityId" gorm:"not null;unique;primary_key;comment:角色ID;size:90"` // 角色ID
AuthorityName string `json:"authorityName" gorm:"comment:角色名"` // 角色名
ParentId uint `json:"parentId" gorm:"comment:父角色ID"` // 父角色ID
ParentId *uint `json:"parentId" gorm:"comment:父角色ID"` // 父角色ID
DataAuthorityId []*SysAuthority `json:"dataAuthorityId" gorm:"many2many:sys_data_authority_id;"`
Children []SysAuthority `json:"children" gorm:"-"`
SysBaseMenus []SysBaseMenu `json:"menus" gorm:"many2many:sys_authority_menus;"`