search_flight_api.go 4.8 KB

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