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.
52 lines
1.2 KiB
52 lines
1.2 KiB
syntax = "v1"
|
|
|
|
// ========== 角色管理类型定义 ==========
|
|
type (
|
|
RoleInfo {
|
|
Id int64 `json:"id"`
|
|
Name string `json:"name"`
|
|
Code string `json:"code"`
|
|
Description string `json:"description"`
|
|
IsSystem bool `json:"isSystem"`
|
|
SortOrder int `json:"sortOrder"`
|
|
Status int `json:"status"`
|
|
CreatedAt string `json:"createdAt"`
|
|
UpdatedAt string `json:"updatedAt"`
|
|
}
|
|
|
|
RoleListResponse {
|
|
List []RoleInfo `json:"list"`
|
|
}
|
|
|
|
CreateRoleRequest {
|
|
Name string `json:"name" validate:"required"`
|
|
Code string `json:"code" validate:"required"`
|
|
Description string `json:"description,optional"`
|
|
SortOrder int `json:"sortOrder,optional"`
|
|
}
|
|
|
|
UpdateRoleRequest {
|
|
Id int64 `path:"id"`
|
|
Name string `json:"name,optional"`
|
|
Description string `json:"description,optional"`
|
|
SortOrder *int `json:"sortOrder,optional"`
|
|
Status *int `json:"status,optional"`
|
|
}
|
|
|
|
DeleteRoleRequest {
|
|
Id int64 `path:"id"`
|
|
}
|
|
|
|
GetRoleMenusRequest {
|
|
Id int64 `path:"id"`
|
|
}
|
|
|
|
RoleMenusResponse {
|
|
MenuIds []int64 `json:"menuIds"`
|
|
}
|
|
|
|
SetRoleMenusRequest {
|
|
Id int64 `path:"id"`
|
|
MenuIds []int64 `json:"menuIds"`
|
|
}
|
|
)
|
|
|