sys_dept.go 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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"
  11. "github.com/tiger1103/gfast/v3/internal/app/system/model/entity"
  12. )
  13. type DeptSearchReq struct {
  14. g.Meta `path:"/dept/list" tags:"部门管理" method:"get" summary:"部门列表"`
  15. DeptName string `p:"deptName"`
  16. Status string `p:"status"`
  17. }
  18. type DeptSearchRes struct {
  19. g.Meta `mime:"application/json"`
  20. DeptList []*entity.SysDept `json:"deptList"`
  21. }
  22. type DeptAddReq struct {
  23. g.Meta `path:"/dept/add" tags:"部门管理" method:"post" summary:"添加部门"`
  24. ParentID int `p:"parentId" v:"required#父级不能为空"`
  25. DeptName string `p:"deptName" v:"required#部门名称不能为空"`
  26. OrderNum int `p:"orderNum" v:"required#排序不能为空"`
  27. Leader string `p:"leader"`
  28. Phone string `p:"phone"`
  29. Email string `p:"email" v:"email#邮箱格式不正确"`
  30. Status uint `p:"status" v:"required#状态必须"`
  31. }
  32. type DeptAddRes struct {
  33. }
  34. type DeptEditReq struct {
  35. g.Meta `path:"/dept/edit" tags:"部门管理" method:"put" summary:"修改部门"`
  36. DeptId int `p:"deptId" v:"required#deptId不能为空"`
  37. ParentID int `p:"parentId" v:"required#父级不能为空"`
  38. DeptName string `p:"deptName" v:"required#部门名称不能为空"`
  39. OrderNum int `p:"orderNum" v:"required#排序不能为空"`
  40. Leader string `p:"leader"`
  41. Phone string `p:"phone"`
  42. Email string `p:"email" v:"email#邮箱格式不正确"`
  43. Status uint `p:"status" v:"required#状态必须"`
  44. }
  45. type DeptEditRes struct {
  46. }
  47. type DeptDeleteReq struct {
  48. g.Meta `path:"/dept/delete" tags:"部门管理" method:"delete" summary:"删除部门"`
  49. Id uint64 `p:"id" v:"required#id不能为空"`
  50. }
  51. type DeptDeleteRes struct {
  52. }
  53. type DeptTreeSelectReq struct {
  54. g.Meta `path:"/dept/treeSelect" tags:"部门管理" method:"get" summary:"获取部门树形菜单"`
  55. }
  56. type DeptTreeSelectRes struct {
  57. g.Meta `mime:"application/json"`
  58. Deps []*model.SysDeptTreeRes `json:"deps"`
  59. }