search_flight_api.go 4.8 KB

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