common.go 567 B

123456789101112131415161718192021222324252627
  1. package model
  2. // Page common page struct for list api
  3. type Page struct {
  4. Num int `json:"num"`
  5. Size int `json:"size"`
  6. Total int `json:"total"`
  7. }
  8. // CommonResponse .
  9. type CommonResponse struct {
  10. Code int `json:"code"`
  11. Message string `json:"message"`
  12. TTL int `json:"ttl"`
  13. }
  14. // CommonExtraDataResponse .
  15. type CommonExtraDataResponse struct {
  16. *CommonResponse
  17. Data map[string]interface{} `json:"data"` //map[gid]interface{}
  18. }
  19. // SourceQueryResponse
  20. type SourceQueryResponse struct {
  21. *CommonResponse
  22. Data map[string]interface{} `json:"data"`
  23. }