search.go 961 B

123456789101112131415161718192021222324252627282930313233343536
  1. package model
  2. // SearchData search result detail.
  3. type SearchData struct {
  4. Code int `json:"code"`
  5. Data *struct {
  6. Order string `json:"order"`
  7. Sort string `json:"sort"`
  8. Page *SearchPage `json:"page"`
  9. Result []*CouponAllowanceInfo `json:"result"`
  10. }
  11. }
  12. // SearchPage struct.
  13. type SearchPage struct {
  14. PN int `json:"num"`
  15. PS int `json:"size"`
  16. Total int `json:"total"`
  17. }
  18. // ArgAllowanceSearch allowance search struct
  19. type ArgAllowanceSearch struct {
  20. PN int `form:"pn" default:"1"`
  21. PS int `form:"ps" default:"20"`
  22. AppID int64 `form:"app_id"`
  23. Mid int64 `form:"mid" validate:"required,min=1,gte=1"`
  24. OrderNO string `form:"order_no"`
  25. CouponToken string `form:"coupon_token"`
  26. BatchToken string `form:"batch_token"`
  27. }
  28. // PageCouponInfo common page info.
  29. type PageCouponInfo struct {
  30. Count int `json:"count"`
  31. Item interface{} `json:"item"`
  32. }