1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- package model
- type RsqRoleList struct {
- Records []RoleVO `json:"records"`
- Current int `json:"current"`
- Size int `json:"size"`
- Pages int `json:"pages"`
- Total int `json:"total"`
- }
- type RoleVO struct {
- ID int64 `gorm:"primary_key" json:"id"`
- TenantId string `gorm:"type:varchar(12);default '000000'" json:"tenantId"`
- ParentName string `json:"parentName"`
- ParentId int64 `gorm:"type:bigint" json:"parentId"`
- RoleName string `gorm:"type:varchar(255)" json:"roleName"`
- Sort int `gorm:"type:int" json:"sort"`
- RoleAlias string `gorm:"type:varchar(255)" json:"roleAlias"`
- IsDeleted int `gorm:"type:int" json:"isDeleted"`
- }
- type ReqRoleRemove struct {
- IDs int64 `json:"ids"`
- Name string `json:"name"`
- }
- type ReqRoleGrant struct {
- RoleIds []int64 `json:"roleIds"`
- MenuIds []int64 `json:"menuIds"`
- DataScopeIds []int64 `json:"dataScopeIds"`
- ApiScopeIds []int64 `json:"apiScopeIds"`
- }
- type RspRoleTree struct {
- RoleDetails []RoleDetail `json:"data"`
- }
- type RoleDetail struct {
- HasChildren bool `json:"hasChildren"`
- ID int64 `json:"id"`
- ParentId int64 `json:"parentId"`
- Title string `json:"title"`
- Key string `json:"key"`
- Value string `json:"value"`
- Children []RoleDetail `json:"children"`
- }
- type BindRole struct {
- ID int64 `json:"id"`
- TenantId string `json:"tenantId"`
- ParentId string `json:"parentId"`
- RoleName string `json:"roleName"`
- Sort int `json:"sort"`
- RoleAlias string `json:"roleAlias"`
- IsDeleted int `json:"isDeleted"`
- }
- const ExistChild = "需要删除的记录中存在子角色,请先删除子角色!"
|