search_flight_api.go 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  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 ResSearchFlight struct {
  8. Code int64 `json:"code"`
  9. Msg string `json:"msg"`
  10. Data ResSearchFlightData `json:"data"`
  11. TraceID string `json:"traceId"`
  12. Success bool `json:"success"`
  13. }
  14. type ResSearchFlightData struct {
  15. Total int `json:"total"`
  16. Status int `json:"status"`
  17. Datas []Datas `json:"datas"`
  18. ServicePackets []ServicePackets `json:"servicePackets"`
  19. }
  20. type Datas struct {
  21. FlightParam string `json:"flightParam"`
  22. FlightInfo FlightInfo `json:"flightInfo,omitempty"`
  23. CabinInfos []CabinInfos `json:"cabinInfos"`
  24. }
  25. type FlightInfo struct {
  26. FlightInfoID string `json:"flightInfoId"`
  27. FlyNo string `json:"flyNo"`
  28. AcCode string `json:"acCode"`
  29. DepCode string `json:"depCode"`
  30. ArrCode string `json:"arrCode"`
  31. DepDateTime string `json:"depDateTime"`
  32. ArrDateTime string `json:"arrDateTime"`
  33. DepTerminal string `json:"depTerminal"`
  34. ArrTerminal string `json:"arrTerminal"`
  35. Model string `json:"model"`
  36. IsStop int `json:"isStop"`
  37. IsShare int `json:"isShare"`
  38. Meal int `json:"meal"`
  39. IsCancel int `json:"isCancel"`
  40. Av int `json:"av"`
  41. }
  42. type CabinInfos struct {
  43. PriceInfoID string `json:"priceInfoId"`
  44. BaseCabin string `json:"baseCabin"`
  45. BaseCodeLevel int `json:"baseCodeLevel"`
  46. Voucher int `json:"voucher"`
  47. Discount float64 `json:"discount"`
  48. Left int `json:"left"`
  49. ServicePackets []interface{} `json:"servicePackets"`
  50. AdtPrice AdtPrice `json:"adtPrice,omitempty"`
  51. ChdPrice ChdPrice `json:"chdPrice,omitempty"`
  52. BusinessField string `json:"businessField"`
  53. ExpectTicketTime int `json:"expectTicketTime,omitempty"`
  54. SaleControls []SaleControls `json:"saleControls,omitempty"`
  55. CabinProductDesc CabinProductDesc `json:"cabinProductDesc"`
  56. }
  57. type CabinProductDesc struct {
  58. ID int `json:"id"`
  59. ProductDesc string `json:"productDesc"`
  60. }
  61. type AdtPrice struct {
  62. ProductType string `json:"productType"`
  63. Cabin string `json:"cabin"`
  64. Price float64 `json:"price"`
  65. TicketPrice float64 `json:"ticketPrice"`
  66. RulePrice float64 `json:"rulePrice"`
  67. OilFee float64 `json:"oilFee"`
  68. AirportFee float64 `json:"airportFee"`
  69. FareBasisCode string `json:"fareBasisCode"`
  70. Rule Rule `json:"rule"`
  71. }
  72. type ChdPrice struct {
  73. ProductType string `json:"productType"`
  74. Cabin string `json:"cabin"`
  75. Price float64 `json:"price"`
  76. TicketPrice float64 `json:"ticketPrice"`
  77. RulePrice float64 `json:"rulePrice"`
  78. OilFee float64 `json:"oilFee"`
  79. AirportFee float64 `json:"airportFee"`
  80. Rule Rule `json:"rule"`
  81. }
  82. type Rule struct {
  83. RefundRule string `json:"refundRule"`
  84. ChangeRule string `json:"changeRule"`
  85. TransferRule string `json:"transferRule"`
  86. RefundExp []RefundExp `json:"refundExp"`
  87. ChangeExp []ChangeExp `json:"changeExp"`
  88. HandBaggageRule HandBaggageRule `json:"handBaggageRule"`
  89. ConsignBaggageRule ConsignBaggageRule `json:"consignBaggageRule"`
  90. }
  91. type RefundExp struct {
  92. TimeTxt string `json:"timeTxt"`
  93. TimeExp string `json:"timeExp"`
  94. Price int `json:"price"`
  95. Percent int `json:"percent"`
  96. }
  97. type ChangeExp struct {
  98. TimeTxt string `json:"timeTxt"`
  99. TimeExp string `json:"timeExp"`
  100. Price int `json:"price"`
  101. Percent int `json:"percent"`
  102. }
  103. type HandBaggageRule struct {
  104. Txt string `json:"txt"`
  105. Pieces int `json:"pieces"`
  106. Weight float64 `json:"weight"`
  107. Volume string `json:"volume"`
  108. }
  109. type ConsignBaggageRule struct {
  110. Txt string `json:"txt"`
  111. Pieces int `json:"pieces"`
  112. Weight float64 `json:"weight"`
  113. Volume string `json:"volume"`
  114. }
  115. type SaleControls struct {
  116. ID int `json:"id"`
  117. PsNum string `json:"psNum"`
  118. PsAge string `json:"psAge"`
  119. PsIDType string `json:"psIdType"`
  120. }
  121. type ServicePackets struct {
  122. ID int `json:"id"`
  123. Title string `json:"title"`
  124. Desc string `json:"desc"`
  125. }