common.go 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. package request
  2. // PageInfo Paging common input parameter structure
  3. type PageInfo struct {
  4. Page int `json:"page" form:"page"` // 页码
  5. PageSize int `json:"pageSize" form:"pageSize"` // 每页大小
  6. Keyword string `json:"keyword" form:"keyword"` //关键字
  7. }
  8. // GetById Find by id structure
  9. type GetById struct {
  10. ID int `json:"id" form:"id"` // 主键ID
  11. }
  12. func (r *GetById) Uint() uint {
  13. return uint(r.ID)
  14. }
  15. type IdsReq struct {
  16. Ids []int `json:"ids" form:"ids"`
  17. }
  18. // GetAuthorityId Get role by id structure
  19. type GetAuthorityId struct {
  20. AuthorityId uint `json:"authorityId" form:"authorityId"` // 角色ID
  21. }
  22. type Ids struct {
  23. Ids []int `json:"ids" form:"ids"`
  24. Id int `json:"id" form:"id"`
  25. }
  26. type SearchProject struct {
  27. PageInfo PageInfo `json:"pageInfo" form:"pageInfo"`
  28. Name string `json:"name" form:"name"`
  29. Time string `json:"time" form:"time"`
  30. State int `json:"state" form:"state"`
  31. }
  32. type SearchWorkingHours struct {
  33. PageInfo PageInfo `json:"pageInfo" form:"pageInfo"`
  34. Code string `json:"code" form:"code"`
  35. Time string `json:"time" form:"time"`
  36. YearTime string `json:"yearTime" form:"yearTime"`
  37. People int `json:"people" form:"people"`
  38. }
  39. type SearchProjectList struct {
  40. PageInfo PageInfo `json:"pageInfo" form:"pageInfo"`
  41. Code string `json:"code" form:"code"`
  42. Name string `json:"name" form:"name"`
  43. Time string `json:"time" form:"time"`
  44. }
  45. type SearchProjectFileList struct {
  46. PageInfo PageInfo `json:"pageInfo" form:"pageInfo"`
  47. Code string `json:"code" form:"code"`
  48. Name string `json:"name" form:"name"`
  49. Genre int `json:"genre" form:"genre"`
  50. }
  51. type SearchIdNameGenre struct {
  52. PageInfo PageInfo `json:"pageInfo" form:"pageInfo"`
  53. Id int `json:"id" form:"id"`
  54. Name string `json:"name" form:"name"`
  55. Genre int `json:"genre" form:"genre"`
  56. }
  57. type Empty struct{}