栏目完善

This commit is contained in:
yxh
2020-03-04 18:16:40 +08:00
parent d3d2326d8a
commit 1e6ade0a0f
5 changed files with 177 additions and 5 deletions
@@ -8,6 +8,11 @@ const (
SingleCateType = 4 //单页栏目
)
//列表搜索参数
type ReqSearchList struct {
Name string `p:"name"`
}
//添加请求参数
type ReqAdd struct {
ParentId uint64 `p:"parent_id" v:"integer|min:0#父级ID不能为空|父级ID必须为大于等于0的整数"`
@@ -23,3 +28,9 @@ type ReqAdd struct {
CateAddress string `p:"cate_address"`
CateContent string `p:"content"`
}
//修改请求参数
type ReqEdit struct {
Id int `p:"id" v:"required|min:1#栏目id不能为空|栏目id参数错误"`
ReqAdd
}