gf2版本同步升级到v2.0.4,修复验证器兼容问题

This commit is contained in:
孟帅
2022-03-22 09:49:17 +08:00
parent 4dc278f9cb
commit c9383334b4
45 changed files with 410 additions and 303 deletions

View File

@@ -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 (
@@ -8,17 +14,17 @@ import (
// 名称是否唯一
type DeptNameUniqueReq struct {
Name string `json:"name" v:"required#部门名称不能为空" description:"部门名称"`
Id int64 `json:"id" description:"部门ID"`
Name string `json:"name" v:"required#部门名称不能为空" dc:"部门名称"`
Id int64 `json:"id" dc:"部门ID"`
g.Meta `path:"/dept/name_unique" method:"get" tags:"部门" summary:"部门名称是否唯一"`
}
type DeptNameUniqueRes struct {
IsUnique bool `json:"is_unique" description:"是否唯一"`
IsUnique bool `json:"is_unique" dc:"是否唯一"`
}
// 查询列表树
type DeptListTreeReq struct {
Id int64 `json:"id" description:"部门ID"`
Id int64 `json:"id" dc:"部门ID"`
g.Meta `path:"/dept/list_tree" method:"get" tags:"部门" summary:"获取部门列表树"`
}
@@ -26,7 +32,7 @@ type DeptListTreeRes []*input.AdminDeptListTreeModel
// 查询列表
type DeptListReq struct {
Name string `json:"name" description:"部门名称"`
Name string `json:"name" dc:"部门名称"`
g.Meta `path:"/dept/list" method:"get" tags:"部门" summary:"获取部门列表"`
}
@@ -34,7 +40,7 @@ type DeptListRes []*input.AdminDeptListModel
// 获取指定信息
type DeptViewReq struct {
Id int64 `json:"id" v:"required#部门ID不能为空" description:"部门ID"`
Id int64 `json:"id" v:"required#部门ID不能为空" dc:"部门ID"`
g.Meta `path:"/dept/view" method:"get" tags:"部门" summary:"获取指定信息"`
}
type DeptViewRes struct {
@@ -50,16 +56,16 @@ type DeptEditRes struct{}
// 删除字典类型
type DeptDeleteReq struct {
Id interface{} `json:"id" v:"required#部门ID不能为空" description:"部门ID"`
Id interface{} `json:"id" v:"required#部门ID不能为空" dc:"部门ID"`
g.Meta `path:"/dept/delete" method:"post" tags:"部门" summary:"删除部门"`
}
type DeptDeleteRes struct{}
// 最大排序
type DeptMaxSortReq struct {
Id int64 `json:"id" description:"部门ID"`
Id int64 `json:"id" dc:"部门ID"`
g.Meta `path:"/dept/max_sort" method:"get" tags:"部门" summary:"部门最大排序"`
}
type DeptMaxSortRes struct {
Sort int `json:"sort" description:"排序"`
Sort int `json:"sort" dc:"排序"`
}