common.go 973 B

12345678910111213141516171819202122232425262728293031323334353637383940
  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 Empty struct{}