mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-11-16 06:03:44 +08:00
gf2版本同步升级到v2.0.4,修复验证器兼容问题
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
//
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2022 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
//
|
||||
package adminForm
|
||||
|
||||
import (
|
||||
@@ -9,51 +15,51 @@ import (
|
||||
|
||||
// 菜单最大排序
|
||||
type MenuMaxSortReq struct {
|
||||
Id int64 `json:"id" description:"菜单ID"`
|
||||
g.Meta `path:"/menu/max_sort" method:"get" tags:"菜单" summary:"菜单最大排序"`
|
||||
Id int64 `json:"id" dc:"菜单ID"`
|
||||
}
|
||||
type MenuMaxSortRes struct {
|
||||
Sort int `json:"sort" description:"排序"`
|
||||
Sort int `json:"sort" dc:"排序"`
|
||||
}
|
||||
|
||||
// 菜单编码是否唯一
|
||||
type MenuCodeUniqueReq struct {
|
||||
Code string `json:"code" v:"required#菜单编码不能为空" description:"菜单编码"`
|
||||
Id int64 `json:"id" description:"菜单ID"`
|
||||
g.Meta `path:"/menu/code_unique" method:"get" tags:"菜单" summary:"菜单编码是否唯一"`
|
||||
Code string `json:"code" v:"required#菜单编码不能为空" dc:"菜单编码"`
|
||||
Id int64 `json:"id" dc:"菜单ID"`
|
||||
}
|
||||
type MenuCodeUniqueRes struct {
|
||||
IsUnique bool `json:"is_unique" description:"是否唯一"`
|
||||
IsUnique bool `json:"is_unique" dc:"是否唯一"`
|
||||
}
|
||||
|
||||
// 菜单名称是否唯一
|
||||
type MenuNameUniqueReq struct {
|
||||
Name string `json:"name" v:"required#菜单名称不能为空" description:"菜单名称"`
|
||||
Id int64 `json:"id" description:"菜单ID"`
|
||||
g.Meta `path:"/menu/name_unique" method:"get" tags:"菜单" summary:"菜单名称是否唯一"`
|
||||
Name string `json:"name" v:"required#菜单名称不能为空" dc:"菜单名称"`
|
||||
Id int64 `json:"id" dc:"菜单ID"`
|
||||
}
|
||||
type MenuNameUniqueRes struct {
|
||||
IsUnique bool `json:"is_unique" description:"是否唯一"`
|
||||
IsUnique bool `json:"is_unique" dc:"是否唯一"`
|
||||
}
|
||||
|
||||
// 修改/新增字典数据
|
||||
type MenuEditReq struct {
|
||||
entity.AdminMenu
|
||||
g.Meta `path:"/menu/edit" method:"post" tags:"菜单" summary:"修改/新增菜单"`
|
||||
entity.AdminMenu
|
||||
}
|
||||
type MenuEditRes struct{}
|
||||
|
||||
// 删除字典类型
|
||||
type MenuDeleteReq struct {
|
||||
Id interface{} `json:"id" v:"required#菜单ID不能为空" description:"菜单ID"`
|
||||
g.Meta `path:"/menu/delete" method:"post" tags:"菜单" summary:"删除菜单"`
|
||||
Id interface{} `json:"id" v:"required#菜单ID不能为空" dc:"菜单ID"`
|
||||
}
|
||||
type MenuDeleteRes struct{}
|
||||
|
||||
// 获取指定字典数据信息
|
||||
type MenuViewReq struct {
|
||||
Id string `json:"id" v:"required#菜单ID不能为空" description:"菜单ID"`
|
||||
g.Meta `path:"/menu/view" method:"get" tags:"菜单" summary:"获取指定菜单信息"`
|
||||
Id string `json:"id" v:"required#菜单ID不能为空" dc:"菜单ID"`
|
||||
}
|
||||
type MenuViewRes struct {
|
||||
*entity.AdminMenu
|
||||
@@ -61,32 +67,32 @@ type MenuViewRes struct {
|
||||
|
||||
// 获取菜单列表
|
||||
type MenuListReq struct {
|
||||
form.PageReq
|
||||
Pid int64 `json:"pid" description:"父ID"`
|
||||
g.Meta `path:"/menu/list" method:"get" tags:"菜单" summary:"获取菜单列表"`
|
||||
form.PageReq
|
||||
Pid int64 `json:"pid" dc:"父ID"`
|
||||
}
|
||||
|
||||
type MenuListRes struct {
|
||||
List []*entity.AdminMenu `json:"list" description:"数据列表"`
|
||||
List []*entity.AdminMenu `json:"list" dc:"数据列表"`
|
||||
form.PageRes
|
||||
}
|
||||
|
||||
// 查询菜单列表
|
||||
type MenuSearchListReq struct {
|
||||
Name string `json:"name" description:"菜单名称"`
|
||||
form.StatusReq
|
||||
g.Meta `path:"/menu/search_list" method:"get" tags:"菜单" summary:"获取菜单列表"`
|
||||
Name string `json:"name" dc:"菜单名称"`
|
||||
form.StatusReq
|
||||
}
|
||||
|
||||
type MenuSearchListRes []*model.TreeMenu
|
||||
|
||||
// 查询角色菜单列表
|
||||
type MenuRoleListReq struct {
|
||||
RoleId string `json:"role_id" description:"角色ID"`
|
||||
g.Meta `path:"/menu/role_list" method:"get" tags:"菜单" summary:"查询角色菜单列表"`
|
||||
RoleId string `json:"role_id" dc:"角色ID"`
|
||||
}
|
||||
|
||||
type MenuRoleListRes struct {
|
||||
Menus []*model.LabelTreeMenu `json:"menus" description:"菜单列表"`
|
||||
CheckedKeys []int64 `json:"checkedKeys" description:"选择的菜单ID"`
|
||||
Menus []*model.LabelTreeMenu `json:"menus" dc:"菜单列表"`
|
||||
CheckedKeys []int64 `json:"checkedKeys" dc:"选择的菜单ID"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user