sys_dept.go 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /*
  2. * @desc:部门管理参数
  3. * @company:云南奇讯科技有限公司
  4. * @Author: yixiaohu<yxh669@qq.com>
  5. * @Date: 2022/4/6 15:07
  6. */
  7. package system
  8. import (
  9. "github.com/gogf/gf/v2/frame/g"
  10. "github.com/tiger1103/gfast/v3/internal/app/system/model/entity"
  11. )
  12. type DeptSearchReq struct {
  13. g.Meta `path:"/dept/list" tags:"部门管理" method:"get" summary:"部门列表"`
  14. DeptName string `p:"deptName"`
  15. Status string `p:"status"`
  16. }
  17. type DeptSearchRes struct {
  18. g.Meta `mime:"application/json"`
  19. DeptList []*entity.SysDept `json:"deptList"`
  20. }
  21. type DeptAddReq struct {
  22. g.Meta `path:"/dept/add" tags:"部门管理" method:"post" summary:"添加部门"`
  23. ParentID int `p:"parentId" v:"required#父级不能为空"`
  24. DeptName string `p:"deptName" v:"required#部门名称不能为空"`
  25. OrderNum int `p:"orderNum" v:"required#排序不能为空"`
  26. Leader string `p:"leader"`
  27. Phone string `p:"phone"`
  28. Email string `p:"email" v:"email#邮箱格式不正确"`
  29. Status uint `p:"status" v:"required#状态必须"`
  30. }
  31. type DeptAddRes struct {
  32. }
  33. type DeptEditReq struct {
  34. g.Meta `path:"/dept/edit" tags:"部门管理" method:"put" summary:"修改部门"`
  35. DeptId int `p:"deptId" v:"required#deptId不能为空"`
  36. ParentID int `p:"parentId" v:"required#父级不能为空"`
  37. DeptName string `p:"deptName" v:"required#部门名称不能为空"`
  38. OrderNum int `p:"orderNum" v:"required#排序不能为空"`
  39. Leader string `p:"leader"`
  40. Phone string `p:"phone"`
  41. Email string `p:"email" v:"email#邮箱格式不正确"`
  42. Status uint `p:"status" v:"required#状态必须"`
  43. }
  44. type DeptEditRes struct {
  45. }
  46. type DeptDeleteReq struct {
  47. g.Meta `path:"/dept/delete" tags:"部门管理" method:"delete" summary:"删除部门"`
  48. Id int64 `p:"id" v:"required#id不能为空"`
  49. }
  50. type DeptDeleteRes struct {
  51. }