oldVip.go 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. package model
  2. import "go-common/library/time"
  3. //VipUserInfoOld vip_user_info table
  4. type VipUserInfoOld struct {
  5. ID int64 `json:"id"`
  6. Mid int64 `json:"mid"`
  7. Type int8 `json:"vipType"`
  8. Status int8 `json:"vipStatus"`
  9. StartTime time.Time `json:"vipStartTime"`
  10. OverdueTime time.Time `json:"vipOverdueTime"`
  11. AnnualVipOverdueTime time.Time `json:"annualVipOverdueTime"`
  12. RecentTime time.Time `json:"vip_recent_time"`
  13. Wander int8 `json:"wander"`
  14. AccessStatus int8 `json:"accessStatus"`
  15. AutoRenewed int8 `json:"auto_renewed"`
  16. IsAutoRenew int8 `json:"is_auto_renew"`
  17. IosOverdueTime time.Time `json:"ios_overdue_time"`
  18. PayChannelID int64 `json:"pay_channel_id"`
  19. Ver int64 `json:"ver"`
  20. Ctime time.Time `json:"ctime"`
  21. Mtime time.Time `json:"mtime"`
  22. }
  23. // ToNew convert old model to new.
  24. func (v *VipUserInfoOld) ToNew() (n *VipUserInfo) {
  25. return &VipUserInfo{
  26. Mid: v.Mid,
  27. Type: v.Type,
  28. PayType: v.IsAutoRenew,
  29. PayChannelID: v.PayChannelID,
  30. Status: v.Status,
  31. StartTime: v.StartTime,
  32. RecentTime: v.RecentTime,
  33. OverdueTime: v.OverdueTime,
  34. AnnualVipOverdueTime: v.AnnualVipOverdueTime,
  35. Ctime: v.Ctime,
  36. Mtime: v.Mtime,
  37. IosOverdueTime: v.IosOverdueTime,
  38. Ver: v.Ver,
  39. }
  40. }
  41. //VipPayOrderOld vip pay order table
  42. type VipPayOrderOld struct {
  43. ID int64 `json:"id"`
  44. OrderNo string `json:"orderNo"`
  45. AppID int64 `json:"appId"`
  46. Platform int8 `json:"platform"`
  47. OrderType int8 `json:"orderType"`
  48. Mid int64 `json:"mid"`
  49. Bmid int64 `json:"bmid"`
  50. BuyMonths int16 `json:"buyMonths"`
  51. Money float64 `json:"money"`
  52. Status int8 `json:"status"`
  53. PayType int8 `json:"payType"`
  54. PaymentTime time.Time `json:"paymentTime"`
  55. Ver int64 `json:"ver"`
  56. AppSubID string `json:"appSubId"`
  57. CouponMoney float64 `json:"coupon_money"`
  58. }
  59. //VipRechargeOrder vip recharge order table
  60. type VipRechargeOrder struct {
  61. ID int `json:"id"`
  62. AppID int `json:"appId"`
  63. PayMid int `json:"payMid"`
  64. OrderNo string `json:"orderNo"`
  65. RechargeBp float64 `json:"rechargeBp"`
  66. ThirdTradeNo string `json:"thirdTradeNo"`
  67. PayOrderNo string `json:"payOrderNo"`
  68. Status int `json:"status"`
  69. Ver int `json:"ver"`
  70. Bmid int `json:"bmid"`
  71. }
  72. //VipChangeHistory .
  73. type VipChangeHistory struct {
  74. ID int64 `json:"id"`
  75. Mid int64 `json:"mid"`
  76. ChangeType int8 `json:"change_type"`
  77. ChangeTime time.Time `json:"change_time"`
  78. Month int16 `json:"month"`
  79. Days int32 `json:"days"`
  80. OperatorID string `json:"operator_id"`
  81. RelationID string `json:"relation_id"`
  82. BatchCodeID int64 `json:"batch_code_id"`
  83. BatchID int64 `json:"batch_id"`
  84. Remark string `json:"remark"`
  85. }