flight-helper 0.1.3__py3-none-any.whl → 0.2.2__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.
- flight_helper/models/dto/booking.py +5 -5
- flight_helper/models/dto/itinerary.py +2 -3
- flight_helper/models/dto/payment.py +2 -2
- flight_helper/models/dto/procurement.py +32 -10
- {flight_helper-0.1.3.dist-info → flight_helper-0.2.2.dist-info}/METADATA +1 -1
- flight_helper-0.2.2.dist-info/RECORD +15 -0
- flight_helper-0.1.3.dist-info/RECORD +0 -15
- {flight_helper-0.1.3.dist-info → flight_helper-0.2.2.dist-info}/WHEEL +0 -0
- {flight_helper-0.1.3.dist-info → flight_helper-0.2.2.dist-info}/licenses/LICENSE +0 -0
- {flight_helper-0.1.3.dist-info → flight_helper-0.2.2.dist-info}/top_level.txt +0 -0
|
@@ -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,
|
|
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[
|
|
29
|
+
sale_increase_threshold: Optional[NonPositiveFloat] = Field(
|
|
30
30
|
default=0.00, description="涨价上限(相对于 sale_price 的绝对值或百分比?按业务定)"
|
|
31
31
|
)
|
|
32
|
-
sale_reduction_threshold: Optional[
|
|
32
|
+
sale_reduction_threshold: Optional[NonPositiveFloat] = Field(
|
|
33
33
|
default=0.00, description="降价上限(相对于 sale_price 的绝对值或百分比?按业务定)"
|
|
34
34
|
)
|
|
35
|
-
standard_increase_threshold: Optional[
|
|
35
|
+
standard_increase_threshold: Optional[NonPositiveFloat] = Field(
|
|
36
36
|
default=0.00, description="涨价上限(相对于 standard_price 的绝对值或百分比?按业务定)"
|
|
37
37
|
)
|
|
38
|
-
standard_reduction_threshold: Optional[
|
|
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,
|
|
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[
|
|
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
|
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
# ---------------------------------------------------------------------------------------------------------
|
|
11
11
|
"""
|
|
12
12
|
from typing import Literal, Optional, Union, Annotated
|
|
13
|
-
from pydantic import BaseModel, Field, TypeAdapter,
|
|
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[
|
|
29
|
+
pay_amount: Optional[NonPositiveFloat] = Field(default=None, description="支付金额")
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
class __BasePaymentInputDTO(__BasePaymentDTO):
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
# Copyright ©2011-2026. Hunan xxxxxxx Company limited. All rights reserved.
|
|
10
10
|
# ---------------------------------------------------------------------------------------------------------
|
|
11
11
|
"""
|
|
12
|
-
from typing import Optional
|
|
13
|
-
from pydantic import BaseModel, PositiveInt,
|
|
12
|
+
from typing import Optional, List, Literal
|
|
13
|
+
from pydantic import BaseModel, PositiveInt, PositiveFloat, Field
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
class ProcurementInputDTO(BaseModel):
|
|
@@ -18,17 +18,39 @@ 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: Optional[int] = Field(default=None, description="出票平台类型ID")
|
|
21
22
|
out_ticket_platform: str = Field(..., description="出票平台")
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
account_number: str = Field(..., description="出票账号", alias="out_ticket_account")
|
|
24
|
+
|
|
25
|
+
type_name: str = Field(..., description="采购账号类型", alias="purchase_account_type")
|
|
26
|
+
account_id: Optional[int] = Field(default=None, description="采购账号ID", alias="purchase_account_id")
|
|
27
|
+
account_name: str = Field(..., description="采购账号", alias="purchase_account")
|
|
28
|
+
|
|
29
|
+
remark: Optional[str] = Field(default=None, description="备注,一般是由采购平台账号 + 账号密码拼接而成")
|
|
30
|
+
|
|
31
|
+
out_ticket_account: Optional[str] = Field(default=None, description="账号", alias="account")
|
|
32
|
+
out_ticket_account_id: Optional[int] = Field(default=None, description="账号ID")
|
|
33
|
+
out_ticket_account_pawword: Optional[str] = Field(default=None, description="密码", alias="password")
|
|
34
|
+
|
|
35
|
+
out_ticket_mobile: Optional[str] = Field(default=None, description="出票手机,退改业务需要根据此手机号码来进行操作")
|
|
27
36
|
|
|
28
37
|
|
|
29
38
|
class ProcurementReusltDTO(BaseModel):
|
|
30
39
|
# 平台信息
|
|
31
40
|
order_no: PositiveInt = Field(..., description="订单号")
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
41
|
+
transaction_amount: PositiveFloat = Field(..., description="采购金额", alias="purchase_amount")
|
|
42
|
+
flight_idx: Optional[int] = Field(default=None, description="采购航段", alias="segment_index")
|
|
43
|
+
passenger_names: List[str] = Field(default=None, description="采购乘客")
|
|
44
|
+
passenger_type: Literal["成人", "儿童", "婴儿"] = Field(
|
|
45
|
+
..., description="乘客类型,必须是:成人、儿童 或 婴儿"
|
|
46
|
+
)
|
|
47
|
+
fids: Optional[str] = Field(default=None, description="乘客的行程ID", alias="flight_ids")
|
|
48
|
+
pids: Optional[List[str]] = Field(default=None, description="乘客ID列表", alias="passenger_ids")
|
|
49
|
+
pay_transaction: Optional[str] = Field(default=None, description="对账标识")
|
|
50
|
+
air_co_order_id: str = Field(..., description="官网订单号")
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
class FillProcurementInputDTO(ProcurementInputDTO, ProcurementReusltDTO):
|
|
54
|
+
order_no: Optional[PositiveInt] = Field(default=None, description="订单号")
|
|
55
|
+
transaction_amount: Optional[PositiveFloat] = Field(default=None, description="采购金额", alias="purchase_amount")
|
|
56
|
+
air_co_order_id: Optional[str] = Field(default=None, description="官网订单号")
|
|
@@ -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=KXCDjdagIY6e_J7EidVlYtBXg66P3J28gq5oqG1NErk,1759
|
|
7
|
+
flight_helper/models/dto/payment.py,sha256=soLXsVznzKDwcDtawPP-OtbLIUfSjmVPk4XfR25pZ-Y,4249
|
|
8
|
+
flight_helper/models/dto/procurement.py,sha256=SgLErC3O0sGNFepRZZQOq0bXYMS1_pGLi8ODtXrXgEU,3388
|
|
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.2.dist-info/licenses/LICENSE,sha256=WtjCEwlcVzkh1ziO35P2qfVEkLjr87Flro7xlHz3CEY,11556
|
|
12
|
+
flight_helper-0.2.2.dist-info/METADATA,sha256=MwRjhDV3Z8nAdOXGPz-K-ti6PW9BqYaFGpgd-EEo-5w,14323
|
|
13
|
+
flight_helper-0.2.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
14
|
+
flight_helper-0.2.2.dist-info/top_level.txt,sha256=UcuL9Tgenq0in0bIdaANexg1HVpkOnRuvBN0iSaB2Nc,14
|
|
15
|
+
flight_helper-0.2.2.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=OyoWIr2lQkO6UsyN3I9dPWYUKEy-LAXthReJ40308Rw,1797
|
|
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.3.dist-info/licenses/LICENSE,sha256=WtjCEwlcVzkh1ziO35P2qfVEkLjr87Flro7xlHz3CEY,11556
|
|
12
|
-
flight_helper-0.1.3.dist-info/METADATA,sha256=rpI0bnDfWGlr1m9mSes0Nkk1HA2oIz4AezDlgKqPR_M,14323
|
|
13
|
-
flight_helper-0.1.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
14
|
-
flight_helper-0.1.3.dist-info/top_level.txt,sha256=UcuL9Tgenq0in0bIdaANexg1HVpkOnRuvBN0iSaB2Nc,14
|
|
15
|
-
flight_helper-0.1.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|