sys_dept.go 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. // =================================================================================
  2. // This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
  3. // =================================================================================
  4. package dao
  5. import (
  6. "gfast/app/system/dao/internal"
  7. "gfast/app/system/model"
  8. )
  9. // sysDeptDao is the manager for logic model data accessing and custom defined data operations functions management.
  10. // You can define custom methods on it to extend its functionality as you wish.
  11. type sysDeptDao struct {
  12. *internal.SysDeptDao
  13. }
  14. var (
  15. // SysDept is globally public accessible object for table sys_dept operations.
  16. SysDept sysDeptDao
  17. )
  18. func init() {
  19. SysDept = sysDeptDao{
  20. internal.NewSysDeptDao(),
  21. }
  22. }
  23. // Fill with you ideas below.
  24. type SysDeptSearchParams struct {
  25. ExcludeId int64 `p:"excludeId"`
  26. DeptName string `p:"deptName"`
  27. Status string `p:"status"`
  28. }
  29. type SysDeptTreeRes struct {
  30. *model.SysDept
  31. Children []*SysDeptTreeRes `json:"children"`
  32. }
  33. type SysDeptAddParams struct {
  34. ParentID int `json:"parentId" orm:"parent_id" p:"parentId" v:"required#父级不能为空"`
  35. DeptName string `json:"deptName" orm:"dept_name" p:"deptName" v:"required#部门名称不能为空"`
  36. OrderNum int `json:"orderNum" orm:"order_num" p:"orderNum" v:"required#排序不能为空"`
  37. Leader string `json:"leader" orm:"leader" p:"leader" v:"required#负责人不能为空"`
  38. Phone string `json:"phone" orm:"Phone" p:"phone" v:"required#电话不能为空"`
  39. Email string `json:"email" orm:"email" p:"email" v:"required#邮箱不能为空"`
  40. Status string `json:"status" orm:"status" p:"status" v:"required#状态必须"`
  41. Ancestors string `json:"ancestors" p:"ancestors" orm:"ancestors"`
  42. CreatedBy uint64 `json:"CreatedBy" orm:"created_by"`
  43. }
  44. type EditParams struct {
  45. DeptID int64 `json:"deptId" orm:"dept_id" p:"id" v:"integer|min:1#ID只能为整数|ID只能为正数"`
  46. SysDeptAddParams
  47. UpdatedBy uint64 `json:"updatedBy" orm:"updated_by"`
  48. }