flight-helper 0.1.7__py3-none-any.whl → 0.2.6__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,7 +11,7 @@
11
11
  """
12
12
  from typing import Optional
13
13
  from flight_helper.validator.type_validator import parse_to_date_str
14
- from pydantic import BaseModel, model_validator, PositiveInt, PositiveFloat, NonNegativeFloat, Field, field_validator
14
+ from pydantic import BaseModel, model_validator, PositiveInt, PositiveFloat, NonPositiveFloat, Field, field_validator
15
15
 
16
16
 
17
17
  class BookingInputDTO(BaseModel):
@@ -26,16 +26,16 @@ class BookingInputDTO(BaseModel):
26
26
  product_type: str = Field(..., description="产品类型,如:经济舱、超级经济舱等")
27
27
  product_name: Optional[str] = Field(default=None, description="产品名称,如:C919特惠,老年特惠")
28
28
 
29
- sale_increase_threshold: Optional[NonNegativeFloat] = Field(
29
+ sale_increase_threshold: Optional[NonPositiveFloat] = Field(
30
30
  default=0.00, description="涨价上限(相对于 sale_price 的绝对值或百分比?按业务定)"
31
31
  )
32
- sale_reduction_threshold: Optional[NonNegativeFloat] = Field(
32
+ sale_reduction_threshold: Optional[NonPositiveFloat] = Field(
33
33
  default=0.00, description="降价上限(相对于 sale_price 的绝对值或百分比?按业务定)"
34
34
  )
35
- standard_increase_threshold: Optional[NonNegativeFloat] = Field(
35
+ standard_increase_threshold: Optional[NonPositiveFloat] = Field(
36
36
  default=0.00, description="涨价上限(相对于 standard_price 的绝对值或百分比?按业务定)"
37
37
  )
38
- standard_reduction_threshold: Optional[NonNegativeFloat] = Field(
38
+ standard_reduction_threshold: Optional[NonPositiveFloat] = Field(
39
39
  default=0.00, description="降价上限(相对于 standard_price 的绝对值或百分比?按业务定)"
40
40
  )
41
41
 
@@ -9,9 +9,8 @@
9
9
  # Copyright ©2011-2026. Hunan xxxxxxx Company limited. All rights reserved.
10
10
  # ---------------------------------------------------------------------------------------------------------
11
11
  """
12
- from aiohttp import CookieJar
13
12
  from typing import Optional, List, Dict, Any
14
- from pydantic import BaseModel, NonNegativeFloat, Field, field_validator
13
+ from pydantic import BaseModel, NonPositiveFloat, Field, field_validator
15
14
 
16
15
 
17
16
  class ItineraryInfoDTO(BaseModel):
@@ -26,7 +25,7 @@ class QueryItineraryResponseDTO(BaseModel):
26
25
  order_no: Optional[str] = Field(default=None, description="业务平台订单号")
27
26
  pre_order_no: str = Field(..., description="采购平台订单号")
28
27
  order_status: Optional[str] = Field(default=None, description="采购平台订单状态")
29
- order_amount: Optional[NonNegativeFloat] = Field(default=None, description="采购平台订单金额")
28
+ order_amount: Optional[NonPositiveFloat] = Field(default=None, description="采购平台订单金额")
30
29
  cash_unit: Optional[str] = Field(default=None, description="采购金额的币种")
31
30
  itinerary_info: List[ItineraryInfoDTO] = Field(..., description="乘客行程单信息")
32
31
 
@@ -14,10 +14,7 @@ from pydantic import BaseModel, Field, PositiveInt
14
14
 
15
15
 
16
16
  class PassengerDTO(BaseModel):
17
- passenger_id: Optional[str] = Field(default=None, description="乘客ID")
18
17
  segment_index: PositiveInt = Field(..., description="航段索引")
19
- flight_id: Optional[str] = Field(default=None, description="航班ID")
20
- table_id: Optional[str] = Field(default=None, description="乘客制表ID")
21
18
  # 乘客基本信息
22
19
  passenger_type: Literal["成人", "儿童", "婴儿"] = Field(
23
20
  ..., description="乘客类型,必须是:成人、儿童 或 婴儿"
@@ -25,14 +22,17 @@ class PassengerDTO(BaseModel):
25
22
  passenger_name: str = Field(
26
23
  ..., description="乘客法定姓名(按证件填写),如:Zhang San 或 张三"
27
24
  )
28
- passenger_alias: Optional[str] = Field(
29
- default=None,
30
- description="乘客中文常用名(仅外国人使用),如:汤姆(对应 Tom)"
31
- )
32
-
33
25
  # 性别与证件
34
26
  gender: Literal["男", "女"] = Field(..., description='性别,只能是"男"或"女"')
35
27
  id_type: Literal["身份证", "港澳通行证", "护照", "军官证", "回乡证"] = Field(
36
28
  ..., description='证件类型'
37
29
  )
38
30
  id_number: str = Field(..., description="证件号码(按证件如实填写)")
31
+
32
+ passenger_id: Optional[str] = Field(default=None, description="乘客ID")
33
+ flight_id: Optional[str] = Field(default=None, description="乘客航段ID")
34
+ table_id: Optional[str] = Field(default=None, description="乘客制表ID")
35
+ passenger_alias: Optional[str] = Field(
36
+ default=None,
37
+ description="乘客中文常用名(仅外国人使用),如:汤姆(对应 Tom)"
38
+ )
@@ -10,7 +10,7 @@
10
10
  # ---------------------------------------------------------------------------------------------------------
11
11
  """
12
12
  from typing import Literal, Optional, Union, Annotated
13
- from pydantic import BaseModel, Field, TypeAdapter, NonNegativeFloat
13
+ from pydantic import BaseModel, Field, TypeAdapter, NonPositiveFloat
14
14
 
15
15
  SupportedChannels = Literal["微信", "支付宝", "汇付天下", "易宝支付"]
16
16
 
@@ -26,7 +26,7 @@ class PaymentResultDTO(__BasePaymentDTO):
26
26
  order_no: str = Field(..., description="报表平台订单号")
27
27
  pre_order_no: Optional[str] = Field(default=None, description="采购平台订单号")
28
28
  pay_transaction: Optional[str] = Field(default=None, description="支付流水")
29
- pay_amount: Optional[NonNegativeFloat] = Field(default=None, description="支付金额")
29
+ pay_amount: Optional[NonPositiveFloat] = Field(default=None, description="支付金额")
30
30
 
31
31
 
32
32
  class __BasePaymentInputDTO(__BasePaymentDTO):
@@ -10,7 +10,7 @@
10
10
  # ---------------------------------------------------------------------------------------------------------
11
11
  """
12
12
  from typing import Optional, List, Literal
13
- from pydantic import BaseModel, PositiveInt, NegativeFloat, Field
13
+ from pydantic import BaseModel, PositiveInt, PositiveFloat, Field
14
14
 
15
15
 
16
16
  class ProcurementInputDTO(BaseModel):
@@ -18,37 +18,37 @@ class ProcurementInputDTO(BaseModel):
18
18
  pl_domain: str = Field(..., description="平台域名,例如:www.ceair.com")
19
19
  pl_protocol: str = Field(..., description="平台协议,例如:https")
20
20
  out_ticket_platform_type: str = Field(..., description="出票平台类型")
21
- out_ticket_platform_type_id: int = Field(..., description="出票平台类型ID")
22
21
  out_ticket_platform: str = Field(..., description="出票平台")
23
- account_number: str = Field(..., description="出票账号", alias="out_ticket_account")
24
-
25
- type_name: str = Field(..., description="采购账号类型", alias="purchase_account_type")
26
- account_id: str = Field(..., description="采购账号ID", alias="purchase_account_id")
27
- account_name: str = Field(..., description="采购账号", alias="purchase_account")
28
-
22
+ account_number: str = Field(..., description="出票账号")
23
+ type_name: str = Field(..., description="采购账号类型")
24
+ purchase_account: str = Field(..., description="采购账号")
29
25
  remark: str = Field(..., description="备注,一般是由采购平台账号 + 账号密码拼接而成")
30
26
 
31
- out_ticket_account: str = Field(..., description="账号", alias="account")
32
- out_ticket_account_id: int = Field(..., description="账号ID")
33
- out_ticket_account_pawword: str = Field(..., description="密码", alias="pawword")
34
-
35
- out_ticket_mobile: str = Field(..., description="出票手机,退改业务需要根据此手机号码来进行操作")
27
+ out_ticket_account: Optional[str] = Field(default=None, description="账号")
28
+ out_ticket_account_id: Optional[int] = Field(default=None, description="账号ID")
29
+ out_ticket_account_password: Optional[str] = Field(default=None, description="密码")
30
+ purchase_account_id: Optional[int] = Field(default=None, description="采购账号ID")
31
+ out_ticket_platform_type_id: Optional[int] = Field(default=None, description="出票平台类型ID")
32
+ out_ticket_mobile: Optional[str] = Field(default=None, description="出票手机,退改业务需要根据此手机号码来进行操作")
36
33
 
37
34
 
38
35
  class ProcurementReusltDTO(BaseModel):
39
36
  # 平台信息
40
37
  order_no: PositiveInt = Field(..., description="订单号")
41
- transaction_amount: NegativeFloat = Field(..., description="采购金额", alias="purchase_amount")
42
- segment_index: Optional[int] = Field(default=None, description="采购航段")
43
- passenger_names: Optional[List[str]] = Field(default=None, description="采购乘客")
38
+ air_co_order_id: str = Field(..., description="官网订单号")
39
+ transaction_amount: PositiveFloat = Field(..., description="采购金额")
44
40
  passenger_type: Literal["成人", "儿童", "婴儿"] = Field(
45
41
  ..., description="乘客类型,必须是:成人、儿童 或 婴儿"
46
42
  )
47
- flight_ids: Optional[List[str]] = Field(default=None, description="航班ID列表")
43
+
44
+ passenger_names: Optional[List[str]] = Field(default=None, description="采购乘客")
45
+ segment_index: Optional[PositiveInt] = Field(default=None, description="航段索引")
46
+ flight_ids: Optional[str] = Field(default=None, description="乘客航段ID")
48
47
  passenger_ids: Optional[List[str]] = Field(default=None, description="乘客ID列表")
49
48
  pay_transaction: Optional[str] = Field(default=None, description="对账标识")
50
- air_co_order_id: str = Field(..., description="官网订单号")
51
49
 
52
50
 
53
51
  class FillProcurementInputDTO(ProcurementInputDTO, ProcurementReusltDTO):
54
- pass
52
+ order_no: Optional[PositiveInt] = Field(default=None, description="订单号")
53
+ transaction_amount: Optional[PositiveFloat] = Field(default=None, description="采购金额")
54
+ air_co_order_id: Optional[str] = Field(default=None, description="官网订单号")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: flight_helper
3
- Version: 0.1.7
3
+ Version: 0.2.6
4
4
  Summary: flight helper python package
5
5
  Author-email: ckf10000 <ckf10000@sina.com>
6
6
  License: Apache License
@@ -0,0 +1,15 @@
1
+ flight_helper/__init__.py,sha256=thrHOfIzem5D1k7RU4iPbsWOZJDhxvdDnJ_wuOrDZ30,475
2
+ flight_helper/models/__init__.py,sha256=58ly88YaKqeLEuPfKWB02-WZqxLaWHfqLGlH77DrF8g,475
3
+ flight_helper/models/dto/__init__.py,sha256=pCL0j7uw5uVeJOcdPos4Ax7Xr6B85rWHPVP8hQ3WxR4,484
4
+ flight_helper/models/dto/booking.py,sha256=3FesVrjErQlzBaIOpZ6FjmBT9DfjDhUGUD6QIrOcS_E,4287
5
+ flight_helper/models/dto/itinerary.py,sha256=cWBt4ZSUUvyaNRYPnRLyN5G76Ell8jlYysSbO6CDw0k,2948
6
+ flight_helper/models/dto/passenger.py,sha256=UkJ9abRXZ3WhwLC0-cxbQ8jAkh1dadd4rin2gZEb2G4,1765
7
+ flight_helper/models/dto/payment.py,sha256=soLXsVznzKDwcDtawPP-OtbLIUfSjmVPk4XfR25pZ-Y,4249
8
+ flight_helper/models/dto/procurement.py,sha256=JV6xOcvHwjX-ZVJiZTbzbfQfudjIfbo0o4BVOe3RD7U,3147
9
+ flight_helper/validator/__init__.py,sha256=Eh60SrFKSaYwcOwLEn3z2lbxfmLUTjWgZR2B7yC-34c,478
10
+ flight_helper/validator/type_validator.py,sha256=CmXMIENl_1hqzN27pmXnS6hniXrN_hjfWnDKobmowWc,1128
11
+ flight_helper-0.2.6.dist-info/licenses/LICENSE,sha256=WtjCEwlcVzkh1ziO35P2qfVEkLjr87Flro7xlHz3CEY,11556
12
+ flight_helper-0.2.6.dist-info/METADATA,sha256=4DHcDDGPTR-vLQ_uk9LZpN1dDc72TH4Jz9qFfqU_U-s,14323
13
+ flight_helper-0.2.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
14
+ flight_helper-0.2.6.dist-info/top_level.txt,sha256=UcuL9Tgenq0in0bIdaANexg1HVpkOnRuvBN0iSaB2Nc,14
15
+ flight_helper-0.2.6.dist-info/RECORD,,
@@ -1,15 +0,0 @@
1
- flight_helper/__init__.py,sha256=thrHOfIzem5D1k7RU4iPbsWOZJDhxvdDnJ_wuOrDZ30,475
2
- flight_helper/models/__init__.py,sha256=58ly88YaKqeLEuPfKWB02-WZqxLaWHfqLGlH77DrF8g,475
3
- flight_helper/models/dto/__init__.py,sha256=pCL0j7uw5uVeJOcdPos4Ax7Xr6B85rWHPVP8hQ3WxR4,484
4
- flight_helper/models/dto/booking.py,sha256=cgWlB-0q3szAjEBHYLqxSehchAXWnGyFBEpGU0k9F7U,4287
5
- flight_helper/models/dto/itinerary.py,sha256=-BaymWWSO6Ukra2P-DzOn1tv4djx2ewYoSdytnPAOT8,2979
6
- flight_helper/models/dto/passenger.py,sha256=KXCDjdagIY6e_J7EidVlYtBXg66P3J28gq5oqG1NErk,1759
7
- flight_helper/models/dto/payment.py,sha256=bM2FoE9k5gPInz_xyot8JKEUrrr_N2r12oJx1TDtCbM,4249
8
- flight_helper/models/dto/procurement.py,sha256=k_c5wOxPyWsxB3NUvXnuBYD0_P7Ehb9yInDSHNjvO7M,2932
9
- flight_helper/validator/__init__.py,sha256=Eh60SrFKSaYwcOwLEn3z2lbxfmLUTjWgZR2B7yC-34c,478
10
- flight_helper/validator/type_validator.py,sha256=CmXMIENl_1hqzN27pmXnS6hniXrN_hjfWnDKobmowWc,1128
11
- flight_helper-0.1.7.dist-info/licenses/LICENSE,sha256=WtjCEwlcVzkh1ziO35P2qfVEkLjr87Flro7xlHz3CEY,11556
12
- flight_helper-0.1.7.dist-info/METADATA,sha256=6hDKwrIOgjmR1QRm747HQbp_rGS_EcFcFy7pbrdNdTo,14323
13
- flight_helper-0.1.7.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
14
- flight_helper-0.1.7.dist-info/top_level.txt,sha256=UcuL9Tgenq0in0bIdaANexg1HVpkOnRuvBN0iSaB2Nc,14
15
- flight_helper-0.1.7.dist-info/RECORD,,