common.go 837 B

123456789101112131415161718192021222324252627282930313233343536373839
  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. // Create Date Find by id structure
  13. type CreateDateReply struct {
  14. CreateDate string `json:"create_date"` // 日期
  15. }
  16. type IdDateReply struct {
  17. GetById
  18. CreateDateReply
  19. }
  20. func (r *GetById) Uint() uint {
  21. return uint(r.ID)
  22. }
  23. type IdsReq struct {
  24. Ids []int `json:"ids" form:"ids"`
  25. }
  26. // GetAuthorityId Get role by id structure
  27. type GetAuthorityId struct {
  28. AuthorityId uint `json:"authorityId" form:"authorityId"` // 角色ID
  29. }
  30. type Empty struct{}