order.go 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. package model
  2. import "go-common/library/time"
  3. // TvPayOrder is table struct
  4. type TvPayOrder struct {
  5. ID int64 `json:"id"`
  6. OrderNo string `json:"order_no"`
  7. Platform int8 `json:"platform"`
  8. OrderType int8 `json:"order_type"`
  9. ActiveType int8 `json:"active_type"`
  10. MID int64 `json:"mid" gorm:"column:mid"`
  11. BuyMonths int8 `json:"buy_months"`
  12. ProductID string `json:"product_id"`
  13. Money int64 `json:"money"`
  14. Quantity int64 `json:"quantity"`
  15. RefundAmount int64 `json:"refund_amount"`
  16. Status int8 `json:"status"`
  17. ThirdTradeNO string `json:"third_trade_no"`
  18. PaymentMoney int64 `json:"payment_money"`
  19. PaymentType string `json:"payment_type"`
  20. PaymentTime time.Time `json:"payment_time"`
  21. Ver int64 `json:"ver"`
  22. Ctime time.Time `json:"ctime"`
  23. Mtime time.Time `json:"mtime"`
  24. }
  25. // TvPayOrderResp is used to list in TV pay order list
  26. type TvPayOrderResp struct {
  27. ID int64 `json:"id"`
  28. OrderNo string `json:"order_no"`
  29. OrderType int8 `json:"order_type"`
  30. ActiveType int8 `json:"active_type"`
  31. MID int64 `json:"mid" form:"mid" gorm:"column:mid"`
  32. BuyMonths int8 `json:"buy_months"`
  33. ProductID string `json:"product_id"`
  34. Money int64 `json:"money"`
  35. Quantity int64 `json:"quantity"`
  36. RefundAmount int64 `json:"refund_amount"`
  37. Status int8 `json:"status"`
  38. ThirdTradeNO string `json:"third_trade_no"`
  39. PaymentMoney int64 `json:"payment_money"`
  40. PaymentType string `json:"payment_type"`
  41. PaymentTime time.Time `json:"payment_time"`
  42. Ctime time.Time `json:"ctime"`
  43. Mtime time.Time `json:"mtime"`
  44. }
  45. // OrderPageHelper is used to list in TV pay order list count
  46. type OrderPageHelper struct {
  47. Items []*TvPayOrderResp `json:"items"`
  48. Total *int64 `json:"total"`
  49. }
  50. // TableName tv_pay_order
  51. func (*TvPayOrderResp) TableName() string {
  52. return "tv_pay_order"
  53. }