panel.go 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. package model
  2. import "go-common/library/time"
  3. // TvPriceConfig is tv vip pay order
  4. type TvPriceConfig struct {
  5. ID int64 `form:"id" json:"id"`
  6. PID int64 `form:"pid" json:"pid" gorm:"column:pid"`
  7. Platform int8 `form:"platform" json:"platform" validate:"required"`
  8. ProductName string `form:"product_name" validate:"required" json:"product_name"`
  9. ProductID string `form:"product_id" validate:"required" json:"product_id"`
  10. SuitType int8 `form:"suit_type" json:"suit_type" `
  11. Month int64 `form:"month" json:"month"`
  12. SubType int8 `form:"sub_type" json:"sub_type" `
  13. Price int64 `form:"price" json:"price"`
  14. Selected int8 `form:"selected" json:"selected"`
  15. Remark string `form:"remark" json:"remark"`
  16. Status int8 `form:"status" json:"status"`
  17. Superscript string `form:"superscript" json:"superscript"`
  18. Operator string `form:"operator" json:"operator"`
  19. OperId int64 `form:"oper_id" json:"oper_id"`
  20. Stime time.Time `form:"stime" json:"stime"`
  21. Etime time.Time `form:"etime" json:"etime"`
  22. Mtime time.Time `json:"mtime"`
  23. }
  24. // TvPriceConfigResp is used show panel info
  25. type TvPriceConfigResp struct {
  26. ID int64 `form:"id" json:"id"`
  27. PID int64 `form:"pid" json:"pid" gorm:"column:pid"`
  28. ProductName string `form:"product_name" json:"product_name"`
  29. ProductID string `form:"product_id" json:"product_id"`
  30. SuitType int8 `form:"suit_type" json:"suit_type"`
  31. Month int64 `form:"month" json:"month"`
  32. SubType int8 `form:"sub_type" json:"sub_type"`
  33. Price int64 `form:"price" json:"price"`
  34. OriginPrice int64 `form:"original_price" json:"original_price"`
  35. Selected int8 `form:"selected" json:"selected"`
  36. Remark string `form:"remark" json:"remark"`
  37. Status int8 `form:"status" json:"status"`
  38. Superscript string `form:"superscript" json:"superscript"`
  39. Operator string `form:"operator" json:"operator"`
  40. OperId int64 `form:"oper_id" json:"oper_id"`
  41. Ctime time.Time `json:"ctime"`
  42. Mtime time.Time `json:"mtime"`
  43. Items []TvPriceConfig `json:"item"`
  44. }
  45. // TvPriceConfigListResp is used to list in TV panel list
  46. type TvPriceConfigListResp struct {
  47. ID int64 `form:"id" json:"id"`
  48. PID int64 `form:"pid" json:"pid" gorm:"column:pid"`
  49. ProductName string `form:"product_name" json:"product_name"`
  50. ProductID string `form:"product_id" json:"product_id"`
  51. SuitType int8 `form:"suit_type" json:"suit_type"`
  52. Month int64 `form:"month" json:"month"`
  53. SubType int8 `form:"sub_type" json:"sub_type"`
  54. Price int64 `form:"price" json:"price"`
  55. OriginPrice int64 `form:"original_price" json:"original_price"`
  56. Selected int8 `form:"selected" json:"selected"`
  57. Status int8 `form:"status" json:"status"`
  58. Operator string `form:"operator" json:"operator"`
  59. OperId int64 `form:"oper_id" json:"oper_id"`
  60. Ctime time.Time `json:"ctime"`
  61. Mtime time.Time `json:"mtime"`
  62. }
  63. // RemotePanel YST product res
  64. type RemotePanel struct {
  65. Product []Product `json:"data"`
  66. Result struct {
  67. ResultCode string `json:"result_code"`
  68. ResultMsg string `json:"result_msg"`
  69. } `json:"result"`
  70. }
  71. // Product YST product
  72. type Product struct {
  73. ID string `json:"id"`
  74. Description string `json:"description"`
  75. Title string `json:"title"`
  76. Price int64 `json:"price"`
  77. ComboPkgID string `json:"combo_pkg_id"`
  78. ComboDes string `json:"combo_des"`
  79. VideoType string `json:"video_type"`
  80. VodType string `json:"vod_type"`
  81. ProductDuration string `json:"product_duration"`
  82. Contract string `json:"contract"`
  83. SuitType int8 `json:"suit_type"`
  84. }
  85. // TableName tv_price_config
  86. func (*TvPriceConfig) TableName() string {
  87. return "tv_price_config"
  88. }
  89. // TableName tv_price_config
  90. func (*TvPriceConfigListResp) TableName() string {
  91. return "tv_price_config"
  92. }