active.group.buy.go 4.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. package models
  2. import "github.com/shopspring/decimal"
  3. type CreateGroupBuyRequest struct {
  4. MerchantOpenId string `json:"merchant_open_id"`
  5. GroupBuyName string `json:"group_buy_name"` // 拼团名
  6. GroupBuyMode int `json:"group_buy_mode"` // 拼团模式 1-真实拼团 2-虚拟拼团
  7. OriginalPrice decimal.Decimal `json:"original_price"` // 原价
  8. GroupBuyOneNum int `json:"group_buy_one_num"` // 人数
  9. GroupBuyOnePrice decimal.Decimal `json:"group_buy_one_price"` // 价格
  10. GroupBuyTwoNum int `json:"group_buy_two_num"` // 人数
  11. GroupBuyTwoPrice decimal.Decimal `json:"group_buy_two_price"` // 价格
  12. GroupBuyThreeNum int `json:"group_buy_three_num"` //
  13. GroupBuyThreePrice decimal.Decimal `json:"group_buy_three_price"` //
  14. GroupBuyFourNum int `json:"group_buy_four_num"` //
  15. GroupBuyFourPrice decimal.Decimal `json:"group_buy_four_price"` //
  16. GroupBuyUrl string `json:"group_buy_url"` // 图片
  17. RebateRate int `json:"rebate_rate"` //佣金比例
  18. GroupBuyProject []CreateGroupBuyProject `json:"group_buy_project"`
  19. }
  20. type CreateGroupBuyProject struct {
  21. ProjectName string `json:"project_name"`
  22. CancelNum int `json:"cancel_num"`
  23. }
  24. type GroupBuyListRequest struct {
  25. OpenId string `json:"open_id"`
  26. PageSize int `json:"page_size"`
  27. PageIndex int `json:"page_index"`
  28. }
  29. type GroupBuyListReply struct {
  30. //GroupBuyInfo []GroupBuyInfo `json:"group_buy_info"`
  31. ID int64 `json:"id"`
  32. MerchantOpenId string `json:"merchant_open_id"`
  33. GroupBuyName string `json:"group_buy_name"` // 拼团名
  34. GroupBuyMode int `json:"group_buy_mode"` // 拼团模式 1-真实拼团 2-虚拟拼团
  35. OriginalPrice decimal.Decimal `json:"original_price"` // 原价
  36. GroupBuyOneNum int `json:"group_buy_one_num"` // 人数
  37. GroupBuyOnePrice decimal.Decimal `json:"group_buy_one_price"` // 价格
  38. GroupBuyTwoNum int `json:"group_buy_two_num"` // 人数
  39. GroupBuyTwoPrice decimal.Decimal `json:"group_buy_two_price"` // 价格
  40. GroupBuyThreeNum int `json:"group_buy_three_num"` //
  41. GroupBuyThreePrice decimal.Decimal `json:"group_buy_three_price"` //
  42. GroupBuyFourNum int `json:"group_buy_four_num"` //
  43. GroupBuyFourPrice decimal.Decimal `json:"group_buy_four_price"` //
  44. GroupBuyUrl string `json:"group_buy_url"` // 图片
  45. RebateRate int `json:"rebate_rate"` //佣金比例
  46. GroupBuyProject []CreateGroupBuyProject `json:"group_buy_project"` //
  47. }
  48. type GroupBuyInfo struct {
  49. ID int64 `json:"id"`
  50. MerchantOpenId string `json:"merchant_open_id"`
  51. GroupBuyName string `json:"group_buy_name"` // 拼团名
  52. GroupBuyMode int `json:"group_buy_mode"` // 拼团模式 1-真实拼团 2-虚拟拼团
  53. OriginalPrice decimal.Decimal `json:"original_price"` // 原价
  54. GroupBuyOneNum int `json:"group_buy_one_num"` // 人数
  55. GroupBuyOnePrice decimal.Decimal `json:"group_buy_one_price"` // 价格
  56. GroupBuyTwoNum int `json:"group_buy_two_num"` // 人数
  57. GroupBuyTwoPrice decimal.Decimal `json:"group_buy_two_price"` // 价格
  58. GroupBuyThreeNum int `json:"group_buy_three_num"` //
  59. GroupBuyThreePrice decimal.Decimal `json:"group_buy_three_price"` //
  60. GroupBuyFourNum int `json:"group_buy_four_num"` //
  61. GroupBuyFourPrice decimal.Decimal `json:"group_buy_four_price"` //
  62. GroupBuyUrl string `json:"group_buy_url"` // 图片
  63. RebateRate int `json:"rebate_rate"` //佣金比例
  64. GroupBuyProject []CreateGroupBuyProject `json:"group_buy_project"`
  65. }