50 lines
1.6 KiB
Go
50 lines
1.6 KiB
Go
package v1
|
|
|
|
import (
|
|
"likedream-goframe/internal/ent/sysmenu"
|
|
|
|
"github.com/gogf/gf/v2/frame/g"
|
|
)
|
|
|
|
type MenuListReq struct {
|
|
g.Meta `path:"/menu" method:"get" tags:"Menu" summary:"获取菜单列表" permission:"system:menu:list"`
|
|
Name string `json:"name"`
|
|
Page int `json:"page" d:"1"`
|
|
Size int `json:"size" d:"10"`
|
|
}
|
|
type MenuTreeReq struct {
|
|
g.Meta `path:"/menu/tree" method:"get" tags:"Menu" summary:"获取菜单树" permission:"system:menu:list"`
|
|
Name string `json:"name"`
|
|
}
|
|
|
|
type MenuGetButtonsReq struct {
|
|
g.Meta `path:"/menu/button/{parentId}" method:"get" tags:"Menu" summary:"获取菜单下的按钮" permission:"system:menu:list"`
|
|
ParentId int64 `json:"parentId"`
|
|
}
|
|
type MenuAddReq struct {
|
|
g.Meta `path:"/menu" method:"post" tags:"Menu" summary:"添加菜单"`
|
|
Name string `json:"name"`
|
|
Label string `json:"label"`
|
|
Type sysmenu.Type `json:"type"`
|
|
Link string `json:"link"`
|
|
Permission string `json:"permission"`
|
|
Route string `json:"route"`
|
|
Component string `json:"component"`
|
|
Hidden bool `json:"hidden"`
|
|
KeepAlive bool `json:"keepAlive"`
|
|
Icon string `json:"icon"`
|
|
Order uint `json:"order"`
|
|
ParentId int64 `json:"parentId"`
|
|
}
|
|
|
|
type MenuUpdateReq struct {
|
|
g.Meta `path:"/menu/{id}" method:"put" tags:"Menu" summary:"更新菜单"`
|
|
MenuAddReq `json:",inline"`
|
|
Id int64 `json:"id"`
|
|
}
|
|
|
|
type MenuDeleteReq struct {
|
|
g.Meta `path:"/menu/{id}" method:"delete" tags:"Menu" summary:"删除菜单"`
|
|
Id int64 `json:"id"`
|
|
}
|