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.
 
 
 
 
 
 

62 lines
1.7 KiB

syntax = "v1"
// ========== 菜单管理类型定义 ==========
type (
MenuItem {
Id int64 `json:"id"`
ParentId int64 `json:"parentId"`
Name string `json:"name"`
Path string `json:"path"`
Icon string `json:"icon"`
Component string `json:"component"`
Type string `json:"type"`
SortOrder int `json:"sortOrder"`
Visible bool `json:"visible"`
Status int `json:"status"`
Children []MenuItem `json:"children"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt"`
}
MenuListResponse {
List []MenuItem `json:"list"`
}
CreateMenuRequest {
ParentId int64 `json:"parentId,optional"`
Name string `json:"name" validate:"required"`
Path string `json:"path,optional"`
Icon string `json:"icon,optional"`
Component string `json:"component,optional"`
Type string `json:"type,optional"`
SortOrder int `json:"sortOrder,optional"`
Visible *bool `json:"visible,optional"`
}
UpdateMenuRequest {
Id int64 `path:"id"`
ParentId *int64 `json:"parentId,optional"`
Name string `json:"name,optional"`
Path string `json:"path,optional"`
Icon string `json:"icon,optional"`
Component string `json:"component,optional"`
Type string `json:"type,optional"`
SortOrder *int `json:"sortOrder,optional"`
Visible *bool `json:"visible,optional"`
Status *int `json:"status,optional"`
}
DeleteMenuRequest {
Id int64 `path:"id"`
}
SortMenuItemPayload {
Id int64 `json:"id"`
SortOrder int `json:"sortOrder"`
ParentId int64 `json:"parentId"`
}
SortMenusRequest {
Items []SortMenuItemPayload `json:"items"`
}
)