card.go 3.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. package models
  2. import "time"
  3. type CreateMerchantCardRequest struct {
  4. MerchantCardName string `json:"merchant_card_name"` // 商户卡名称
  5. MerchantOpenID string `json:"open_id"` // openid
  6. CardProjectData []int64 `json:"card_project_data"` // 项目
  7. CardPrice string `json:"card_price"` // 单价
  8. ActivityEndTime string `json:"activity_end_time"` // 活动结束时间
  9. ActivityStartTime string `json:"activity_start_time"` // 活动开始时间
  10. MerchantCardTime string `json:"merchant_card_time"` // 商户卡有效期
  11. Inventory string `json:"inventory"` // 库存数量
  12. QuotaNum string `json:"quota_num"` // 限购数量
  13. UseRule string `json:"use_rule"` // 使用规则
  14. Picture string `json:"picture"` // 图片
  15. RebateRate string `json:"rebate_rate"` // 佣金比例
  16. }
  17. type GetMerchantCardRequest struct {
  18. MerchantId int64 `json:"merchant_card_id"` //商户卡id
  19. }
  20. type GetMerchantCardReply struct {
  21. MerchantCardName string `json:"merchant_card_name"` // 商户卡名称
  22. MerchantOpenID string `json:"merchant_open_id"` // openid
  23. CardProjectData string `json:"card_project_data"` // 项目
  24. CardPrice string `json:"card_price"` // 单价
  25. ActivityEndTime string `json:"activity_end_time"` // 活动结束时间
  26. ActivityStartTime string `json:"activity_start_time"` // 活动开始时间
  27. MerchantCardTime string `json:"merchant_card_time"` // 商户卡有效期
  28. Inventory int64 `json:"inventory"` // 库存数量
  29. QuotaNum int64 `json:"quota_num"` // 限购数量
  30. UseRule string `json:"use_rule"` // 使用规则
  31. Picture string `json:"picture"` // 图片
  32. RebateRate int64 `json:"rebate_rate"`
  33. }
  34. type MerchantCardListRequest struct {
  35. OpenId string `json:"open_id"`
  36. PageSize int `json:"page_size"`
  37. PageIndex int `json:"page_index"`
  38. TypeList int `json:"type_list"` //1-未开始 2-进行中 3-已结束
  39. }
  40. type MerchantCardListReply struct {
  41. ID int64 `json:"id"`
  42. MerchantCardName string `json:"merchant_card_name"` // 商户卡名称
  43. MerchantOpenID string `json:"merchant_open_id"` // openid
  44. CardProjectData string `json:"card_project_data"` // 项目
  45. CardPrice string `json:"card_price"` // 单价
  46. ActivityEndTime int64 `json:"activity_end_time"` // 活动结束时间
  47. ActivityStartTime int64 `json:"activity_start_time"` // 活动开始时间
  48. MerchantCardTime int64 `json:"merchant_card_time"` // 商户卡有效期
  49. Inventory int64 `json:"inventory"` // 库存数量
  50. QuotaNum int64 `json:"quota_num"` // 限购数量
  51. UseRule string `json:"use_rule"` // 使用规则
  52. Picture string `json:"picture"` // 图片
  53. RebateRate int64 `json:"rebate_rate"` // 佣金比例
  54. CreateBy int64 `json:"create_by"` // 创建者
  55. UpdateBy int64 `json:"update_by"` // 更新者
  56. CreatedAt time.Time `json:"created_at"` // 创建时间
  57. UpdatedAt time.Time `json:"updated_at"` // 最后更新时间
  58. DeletedAt time.Time `json:"deleted_at"`
  59. RebateAmount string `json:"rebate_amount"` // 佣金
  60. }
  61. type UpdateMerchantCardRequest struct {
  62. ID int64 `json:"id"`
  63. ActivityEndTime int64 `json:"activity_end_time"` // 活动结束时间
  64. ActivityStartTime int64 `json:"activity_start_time"` // 活动开始时间
  65. Inventory int64 `json:"inventory"` // 库存数量
  66. QuotaNum int64 `json:"quota_num"` // 限购数量
  67. UseRule string `json:"use_rule"` // 使用规则
  68. Picture string `json:"picture"` // 图片
  69. }