新增菜单和角色关联接口
This commit is contained in:
27
api/roleMenu/v1/roleMenu.go
Normal file
27
api/roleMenu/v1/roleMenu.go
Normal file
@ -0,0 +1,27 @@
|
||||
package v1
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// ListReq 角色菜单列表请求
|
||||
type ListReq struct {
|
||||
g.Meta `path:"/role-menu" method:"get" tags:"角色菜单" summary:"获取角色菜单列表"`
|
||||
RoleId int64 `json:"roleId" v:"required#角色ID不能为空" dc:"角色ID"`
|
||||
}
|
||||
|
||||
// ListRes 角色菜单列表响应
|
||||
type ListRes struct {
|
||||
List interface{} `json:"list" dc:"角色菜单列表"`
|
||||
Total int `json:"total" dc:"总条数"`
|
||||
}
|
||||
|
||||
type SaveRoleMenuReq struct {
|
||||
g.Meta `path:"/role-menu" method:"post" tags:"角色菜单" summary:"保存角色菜单"`
|
||||
RoleId int `json:"roleId" v:"required#角色ID不能为空" dc:"角色ID"`
|
||||
MenuIds []int `json:"menuIds" v:"required#菜单ID列表不能为空" dc:"菜单ID列表"`
|
||||
}
|
||||
|
||||
type SaveRoleMenuRes struct {
|
||||
Success bool `json:"success" dc:"是否成功"`
|
||||
}
|
||||
Reference in New Issue
Block a user