mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-08-28 06:56:10 +08:00
发布v2.8.4版本,更新内容请查看:https://github.com/bufanyun/hotgo/tree/v2.0/docs/guide-zh-CN/addon-version-upgrade.md
This commit is contained in:
@@ -7,7 +7,6 @@ package post
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"hotgo/internal/model/entity"
|
||||
"hotgo/internal/model/input/adminin"
|
||||
"hotgo/internal/model/input/form"
|
||||
)
|
||||
@@ -15,7 +14,7 @@ import (
|
||||
// EditReq 修改/新增岗位
|
||||
type EditReq struct {
|
||||
g.Meta `path:"/post/edit" method:"post" tags:"岗位" summary:"修改/新增岗位"`
|
||||
entity.AdminPost
|
||||
adminin.PostEditInp
|
||||
}
|
||||
|
||||
type EditRes struct{}
|
||||
@@ -23,7 +22,7 @@ type EditRes struct{}
|
||||
// DeleteReq 删除岗位
|
||||
type DeleteReq struct {
|
||||
g.Meta `path:"/post/delete" method:"post" tags:"岗位" summary:"删除岗位"`
|
||||
Id interface{} `json:"id" v:"required#岗位ID不能为空" description:"岗位ID"`
|
||||
adminin.PostDeleteInp
|
||||
}
|
||||
|
||||
type DeleteRes struct{}
|
||||
@@ -31,21 +30,17 @@ type DeleteRes struct{}
|
||||
// MaxSortReq 最大排序
|
||||
type MaxSortReq struct {
|
||||
g.Meta `path:"/post/maxSort" method:"get" tags:"岗位" summary:"岗位最大排序"`
|
||||
Id int64 `json:"id" description:"岗位ID"`
|
||||
adminin.PostMaxSortInp
|
||||
}
|
||||
|
||||
type MaxSortRes struct {
|
||||
Sort int `json:"sort" description:"排序"`
|
||||
*adminin.PostMaxSortModel
|
||||
}
|
||||
|
||||
// ListReq 获取列表
|
||||
type ListReq struct {
|
||||
g.Meta `path:"/post/list" method:"get" tags:"岗位" summary:"获取岗位列表"`
|
||||
form.PageReq
|
||||
form.RangeDateReq
|
||||
form.StatusReq
|
||||
Name string `json:"name" description:"岗位名称"`
|
||||
Code string `json:"code" description:"岗位编码"`
|
||||
adminin.PostListInp
|
||||
}
|
||||
|
||||
type ListRes struct {
|
||||
@@ -56,39 +51,17 @@ type ListRes struct {
|
||||
// ViewReq 获取指定信息
|
||||
type ViewReq struct {
|
||||
g.Meta `path:"/post/view" method:"get" tags:"岗位" summary:"获取指定信息"`
|
||||
Id string `json:"id" v:"required#岗位ID不能为空" description:"岗位ID"`
|
||||
adminin.PostViewInp
|
||||
}
|
||||
|
||||
type ViewRes struct {
|
||||
*adminin.PostViewModel
|
||||
}
|
||||
|
||||
// CodeUniqueReq 编码是否唯一
|
||||
type CodeUniqueReq struct {
|
||||
g.Meta `path:"/post/code_unique" method:"get" tags:"岗位" summary:"岗位编码是否唯一"`
|
||||
Code string `json:"code" v:"required#岗位编码不能为空" description:"岗位编码"`
|
||||
Id int64 `json:"id" description:"岗位ID"`
|
||||
}
|
||||
|
||||
type CodeUniqueRes struct {
|
||||
IsUnique bool `json:"is_unique" description:"是否唯一"`
|
||||
}
|
||||
|
||||
// NameUniqueReq 名称是否唯一
|
||||
type NameUniqueReq struct {
|
||||
g.Meta `path:"/post/name_unique" method:"get" tags:"岗位" summary:"岗位名称是否唯一"`
|
||||
Name string `json:"name" v:"required#岗位名称不能为空" description:"岗位名称"`
|
||||
Id int64 `json:"id" description:"岗位ID"`
|
||||
}
|
||||
|
||||
type NameUniqueRes struct {
|
||||
IsUnique bool `json:"is_unique" description:"是否唯一"`
|
||||
}
|
||||
|
||||
// StatusReq 更新状态
|
||||
type StatusReq struct {
|
||||
entity.AdminPost
|
||||
g.Meta `path:"/post/status" method:"post" tags:"岗位" summary:"更新岗位状态"`
|
||||
adminin.PostStatusInp
|
||||
}
|
||||
|
||||
type StatusRes struct{}
|
||||
|
Reference in New Issue
Block a user