param.go 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. package model
  2. // ArgMid .
  3. type ArgMid struct {
  4. Mid int64 `form:"mid" validate:"required,min=1,gte=1"`
  5. Type int8 `form:"type" validate:"required,min=1,gte=1"`
  6. }
  7. // ArgUseCoupon .
  8. type ArgUseCoupon struct {
  9. Mid int64 `form:"mid" validate:"required,min=1,gte=1"`
  10. Type int8 `form:"type" validate:"required,min=1,gte=1"`
  11. Remark string `form:"remark" validate:"required"`
  12. OrderNO string `form:"order_id" validate:"required"`
  13. Oid int64 `form:"oid" validate:"required,min=1,gte=1"`
  14. Ver int64 `form:"ver" validate:"required,min=1,gte=1"`
  15. }
  16. // ArgUseCartoonCoupon def .
  17. type ArgUseCartoonCoupon struct {
  18. Mid int64 `form:"mid" validate:"required,min=1,gte=1"`
  19. Type int8 `form:"type" validate:"required,min=1,gte=1"`
  20. Tips string `form:"tips" validate:"required"`
  21. Remark string `form:"remark" validate:"required"`
  22. OrderNO string `form:"order_id" validate:"required"`
  23. Count int64 `form:"count" validate:"required,min=1,gte=1"`
  24. Ver int64 `form:"ver" validate:"required,min=1,gte=1"`
  25. }
  26. // ArgCoupon .
  27. type ArgCoupon struct {
  28. Mid int64 `form:"mid" validate:"required,min=1,gte=1"`
  29. CouponToken string `form:"coupon_token" validate:"required"`
  30. }
  31. // ChangeCoupon .
  32. type ChangeCoupon struct {
  33. Mid int64 `form:"mid"`
  34. CouponToken string `form:"coupon_token"`
  35. Ver int64 `form:"ver"`
  36. UseVer int64 `form:"use_ver"`
  37. }
  38. // ArgAdd .
  39. type ArgAdd struct {
  40. Mid int64 `form:"mid" validate:"required,min=1,gte=1"`
  41. StartTime int64 `form:"start_time"`
  42. ExpireTime int64 `form:"expire_time" validate:"required,min=1,gte=1"`
  43. Type int64 `form:"type" validate:"required,min=1,gte=1"`
  44. Origin int64 `form:"origin" validate:"required,min=1,gte=1"`
  45. }
  46. // ArgPage .
  47. type ArgPage struct {
  48. State int8 `form:"state"`
  49. Pn int `form:"pn"`
  50. Ps int `form:"ps"`
  51. }
  52. // ArgSalary salary coupon.
  53. type ArgSalary struct {
  54. Mid int64 `form:"mid" validate:"required,min=1,gte=1"`
  55. CouponType int64 `form:"type" validate:"required,min=1,gte=1"`
  56. Count int `form:"count" validate:"required,min=1,gte=1"`
  57. BatchToken string `form:"batch_no" validate:"required"`
  58. AppID int64 `form:"app_id"`
  59. }
  60. // ArgUseAllowance allowance coupon use.
  61. type ArgUseAllowance struct {
  62. Mid int64 `form:"mid" validate:"required,min=1,gte=1"`
  63. CouponToken string `form:"coupon_token" validate:"required"`
  64. Remark string `form:"remark" validate:"required"`
  65. OrderNO string `form:"order_id" validate:"required"`
  66. Price float64 `form:"price" validate:"required"`
  67. Platform string `form:"platform" default:"pc"`
  68. MobiApp string `form:"mobi_app"`
  69. PanelType string `form:"panel_type" default:"normal"`
  70. Device string `form:"device"`
  71. Build int64 `form:"build"`
  72. ProdLimMonth int8 `form:"product_limit_month"`
  73. ProdLimRenewal int8 `form:"product_limit_renewal"`
  74. }
  75. // ArgCount allowance count.
  76. type ArgCount struct {
  77. Mid int64 `form:"mid" validate:"required,min=1,gte=1"`
  78. }
  79. //ArgReceiveAllowance .
  80. type ArgReceiveAllowance struct {
  81. Mid int64 `form:"mid" validate:"required" json:"mid"`
  82. BatchToken string `form:"batch_token" validate:"required" json:"batch_token"`
  83. OrderNo string `form:"order_no" validate:"required" json:"order_no"`
  84. Appkey string `form:"appkey" validate:"required" json:"appkey"`
  85. }
  86. //ArgAllowanceCheck .
  87. type ArgAllowanceCheck struct {
  88. Mid int64 `form:"mid" validate:"required" json:"mid"`
  89. OrderNo string `form:"order_no" validate:"required" json:"order_no"`
  90. }
  91. // ArgPrizeDraw struct .
  92. type ArgPrizeDraw struct {
  93. Mid int64 `form:"mid" validate:"required,gte=1"`
  94. CardType int8 `form:"card_type" validate:"gte=0,lte=2" json:"card_type"`
  95. }
  96. // ArgAllowanceCoupons arg allowance coupon.
  97. type ArgAllowanceCoupons struct {
  98. Mid int64
  99. State int8
  100. }