welfare.go 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. package model
  2. import (
  3. "go-common/library/time"
  4. xtime "go-common/library/time"
  5. )
  6. // ArgWelfareList args for welfare list.
  7. type ArgWelfareList struct {
  8. Tid int64 `form:"tid"`
  9. Recommend int64 `form:"recommend"`
  10. Ps int64 `form:"ps"`
  11. Pn int64 `form:"pn"`
  12. NowTime xtime.Time `form:"-"`
  13. }
  14. // WelfareListResp response for welfare list.
  15. type WelfareListResp struct {
  16. ID int32 `json:"id"`
  17. Name string `json:"name"`
  18. HomepageUri string `json:"homepage_uri"`
  19. BackdropUri string `json:"backdrop_uri"`
  20. Tid int32 `json:"tid"`
  21. Rank int32 `json:"rank"`
  22. }
  23. // WelfareTypeListResp response for welfare type list.
  24. type WelfareTypeListResp struct {
  25. ID int32 `json:"id"`
  26. Name string `json:"name"`
  27. }
  28. // ArgWelfareInfo args for welfare info.
  29. type ArgWelfareInfo struct {
  30. ID int64 `form:"id"`
  31. MID int64 `form:"mid"`
  32. }
  33. // WelfareInfoResp response for welfare info.
  34. type WelfareInfoResp struct {
  35. ID int32 `json:"id"`
  36. Name string `json:"name"`
  37. Desc string `json:"desc"`
  38. ReceiveRate int `json:"receive_rate"`
  39. HomepageUri string `json:"homepage_uri"`
  40. BackdropUri string `json:"backdrop_uri"`
  41. Finished bool `json:"finished"`
  42. Received bool `json:"received"`
  43. UsageForm int32 `json:"usage_form"`
  44. VipType int64 `json:"vip_type"`
  45. Stime time.Time `json:"stime"`
  46. Etime time.Time `json:"etime"`
  47. }
  48. // ArgWelfareReceive args for welfare receive.
  49. type ArgWelfareReceive struct {
  50. Wid int64 `form:"wid"`
  51. Mid int64 `form:"mid"`
  52. }
  53. // WelfareReceiveResp response for welfare receive.
  54. type WelfareReceiveResp struct {
  55. }
  56. // WelfareBatchResp response for welfare batch.
  57. type WelfareBatchResp struct {
  58. Id int `json:"id"`
  59. ReceivedCount int `json:"received_count"`
  60. Count int `json:"count"`
  61. Vtime time.Time `json:"vtime"`
  62. }
  63. // ReceivedCodeResp response for welfare code.
  64. type ReceivedCodeResp struct {
  65. ID int `json:"id"`
  66. Mtime time.Time `json:"mtime"`
  67. }
  68. // UnReceivedCodeResp response for welfare unreceive.
  69. type UnReceivedCodeResp struct {
  70. Id int `json:"id"`
  71. Bid int `json:"bid"`
  72. Code string `json:"code"`
  73. }
  74. // ReceiveRecordResp response for welfare record.
  75. type ReceiveRecordResp struct {
  76. Id int `json:"id"`
  77. Mid int `json:"mid"`
  78. Wid int `json:"wid"`
  79. MonthYear int `json:"month_year"`
  80. Count int `json:"count"`
  81. }
  82. // MyWelfareResp response for my welfare.
  83. type MyWelfareResp struct {
  84. Wid int32 `json:"wid"`
  85. Name string `json:"name"`
  86. Desc string `json:"desc"`
  87. UsageForm int32 `json:"usage_form"`
  88. ReceiveUri string `json:"receive_uri"`
  89. Code string `json:"code"`
  90. Expired bool `json:"expired"`
  91. Stime time.Time `json:"stime"`
  92. Etime time.Time `json:"etime"`
  93. }