vip.go 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. package model
  2. import (
  3. pb "go-common/app/service/main/tv/api"
  4. )
  5. type CreateQrReq struct {
  6. Mid int64 `form:"mid" validate:"required"`
  7. Pid int32 `form:"pid" validate:"required"`
  8. BuyNum int32 `form:"buy_num" validate:"required"`
  9. AppChannel string `form:"app_channel"`
  10. Guid string
  11. }
  12. func (in *CreateQrReq) CopyIntoPbCreateOrReq(out *pb.CreateQrReq) {
  13. out.Mid = in.Mid
  14. out.Pid = in.Pid
  15. out.BuyNum = in.BuyNum
  16. out.Guid = in.Guid
  17. out.AppChannel = in.AppChannel
  18. }
  19. type CreateGuestQrReq struct {
  20. Pid int32 `form:"pid" validate:"required"`
  21. BuyNum int32 `form:"buy_num" validate:"required"`
  22. AppChannel string `form:"app_channel"`
  23. Guid string
  24. }
  25. func (in *CreateGuestQrReq) CopyIntoPbCreateGuestQrReq(out *pb.CreateGuestQrReq) {
  26. out.Pid = in.Pid
  27. out.BuyNum = in.BuyNum
  28. out.Guid = in.Guid
  29. out.AppChannel = in.AppChannel
  30. }
  31. type CreateOrderReq struct {
  32. Token string `form:"token" validate:"required"`
  33. Platform int8
  34. PaymentType string
  35. }
  36. func (in *CreateOrderReq) CopyIntoPbCreateOrderReq(out *pb.CreateOrderReq) {
  37. out.Token = in.Token
  38. out.Platform = in.Platform
  39. out.PaymentType = in.PaymentType
  40. }
  41. type CreateGuestOrderReq struct {
  42. Token string `form:"token" validate:"required"`
  43. Platform int8
  44. PaymentType string
  45. }
  46. func (in *CreateGuestOrderReq) CopyIntoPbCreateGuestOrderReq(out *pb.CreateGuestOrderReq) {
  47. out.Token = in.Token
  48. out.Platform = in.Platform
  49. out.PaymentType = in.PaymentType
  50. }
  51. type WxContractCallbackReq struct {
  52. ContractId string `json:"contract_id" url:"contract_id" validate:"required"`
  53. ContractCode string `json:"contract_code" url:"contract_code" validate:"required"`
  54. ChangeType string `json:"change_type" url:"contract_id" validate:"required"`
  55. ContractTerminationMode string `json:"contract_termination_mode" url:"contract_termination_mode,omitempty"`
  56. Sign string `json:"sign" url:"sign" validate:"required"`
  57. }
  58. func (in *WxContractCallbackReq) CopyIntoPbWxContractCallbackReq(out *pb.WxContractCallbackReq) {
  59. out.ContractId = in.ContractId
  60. out.ContractCode = in.ContractCode
  61. out.ChangeType = in.ChangeType
  62. out.ContractTerminationMode = in.ContractTerminationMode
  63. out.Sign = in.Sign
  64. }
  65. type YstPayCallbackReq struct {
  66. SeqNo string `json:"seqno" validate:"required"`
  67. TraceNo string `json:"traceno" validate:"required"`
  68. TradeState string `json:"trade_state" validate:"required"`
  69. ContractId string `json:"contract_id"`
  70. Sign string `json:"sign" validate:"required"`
  71. }
  72. func (in *YstPayCallbackReq) CopyIntoPbPayCallbackReq(out *pb.PayCallbackReq) {
  73. out.SeqNo = in.SeqNo
  74. out.TraceNo = in.TraceNo
  75. out.TradeState = in.TradeState
  76. out.ContractId = in.ContractId
  77. out.Sign = in.Sign
  78. }
  79. type YstUserInfoReq struct {
  80. Mid int64 `form:"mid" validate:"required"`
  81. Sign string `form:"sign" validate:"required"`
  82. }