search_flight_api.go 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. package structs
  2. type ReqSearchFlightData struct {
  3. DepCode string `json:"depCode"`
  4. ArrCode string `json:"arrCode"`
  5. Date string `json:"date"`
  6. }
  7. type ResSearchFlightData struct {
  8. Code int64 `json:"code"`
  9. Msg string `json:"msg"`
  10. Data ResSearchFlightDataData `json:"data"`
  11. TraceID string `json:"traceId"`
  12. Success bool `json:"success"`
  13. }
  14. type ResSearchFlightDataData struct {
  15. Total int64 `json:"total"`
  16. Status int64 `json:"status"`
  17. Datas []DataElement `json:"datas"`
  18. ServicePackets []ServicePacket `json:"servicePackets"`
  19. }
  20. type DataElement struct {
  21. FlightInfo FlightInfo `json:"flightInfo"`
  22. CabinInfos []CabinInfo `json:"cabinInfos"`
  23. }
  24. type CabinInfo struct {
  25. PriceInfoID string `json:"priceInfoId"`
  26. BaseCabin string `json:"baseCabin"`
  27. Voucher int64 `json:"voucher"`
  28. ExpectTicketTime int64 `json:"expectTicketTime"`
  29. Discount float64 `json:"discount"`
  30. Left int64 `json:"left"`
  31. ProductAttribute int64 `json:"productAttribute"`
  32. SaleControl []SaleControl `json:"saleControl"`
  33. ServicePackets []int64 `json:"servicePackets"`
  34. CabinProductDesc CabinProductDesc `json:"cabinProductDesc"`
  35. ADTPrice Price `json:"adtPrice"`
  36. ChdPrice Price `json:"chdPrice"`
  37. BusinessField string `json:"businessField"`
  38. }
  39. type Price struct {
  40. ProductType string `json:"productType"`
  41. Cabin string `json:"cabin"`
  42. Price int64 `json:"price"`
  43. TicketPrice int64 `json:"ticketPrice"`
  44. RulePrice int64 `json:"rulePrice"`
  45. OilFee *int64 `json:"oilFee,omitempty"`
  46. AirportFee *int64 `json:"airportFee,omitempty"`
  47. FareBasisCode string `json:"fareBasisCode"`
  48. Rule Rule `json:"rule"`
  49. }
  50. type Rule struct {
  51. RefundRule string `json:"refundRule"`
  52. ChangeRule string `json:"changeRule"`
  53. TransferRule string `json:"transferRule"`
  54. RefundExp []Exp `json:"refundExp"`
  55. ChangeExp []Exp `json:"changeExp"`
  56. HandBaggageRule BaggageRule `json:"handBaggageRule"`
  57. ConsignBaggageRule BaggageRule `json:"consignBaggageRule"`
  58. }
  59. type Exp struct {
  60. TimeTxt string `json:"timeTxt"`
  61. TimeExp string `json:"timeExp"`
  62. Price int64 `json:"price"`
  63. Percent int64 `json:"percent"`
  64. }
  65. type BaggageRule struct {
  66. Txt string `json:"txt"`
  67. Pieces int64 `json:"pieces"`
  68. Weight int64 `json:"weight"`
  69. Volume string `json:"volume"`
  70. }
  71. type CabinProductDesc struct {
  72. ID int64 `json:"id"`
  73. ProductDesc string `json:"productDesc"`
  74. }
  75. type SaleControl struct {
  76. ID int64 `json:"id"`
  77. PSNum *string `json:"psNum,omitempty"`
  78. PSType string `json:"psType"`
  79. PSIDType *string `json:"psIdType,omitempty"`
  80. PSIDNo *string `json:"psIdNo,omitempty"`
  81. PSAge *string `json:"psAge,omitempty"`
  82. PSGender *string `json:"psGender,omitempty"`
  83. NewMember *int64 `json:"newMember,omitempty"`
  84. HasAge *string `json:"hasAge,omitempty"`
  85. CheckThreeElement *int64 `json:"checkThreeElement,omitempty"`
  86. }
  87. type FlightInfo struct {
  88. FlightInfoID string `json:"flightInfoId"`
  89. FlyNo string `json:"flyNo"`
  90. ACCode string `json:"acCode"`
  91. DepCode string `json:"depCode"`
  92. ArrCode string `json:"arrCode"`
  93. DepDateTime string `json:"depDateTime"`
  94. ArrDateTime string `json:"arrDateTime"`
  95. DepTerminal string `json:"depTerminal"`
  96. ArrTerminal string `json:"arrTerminal"`
  97. Model string `json:"model"`
  98. IsStop int64 `json:"isStop"`
  99. IsShare int64 `json:"isShare"`
  100. Meal int64 `json:"meal"`
  101. IsCancel int64 `json:"isCancel"`
  102. }
  103. type ServicePacket struct {
  104. ID int64 `json:"id"`
  105. Title string `json:"title"`
  106. Desc string `json:"desc"`
  107. }