018 add parcel type

This commit is contained in:
Раис Юсупалиев
2026-03-16 01:14:46 +03:00
parent 54160a0e38
commit c4175121a0
10 changed files with 346 additions and 11 deletions
+6
View File
@@ -10,6 +10,11 @@ class DeliveryEntity(StrEnum):
LEGAL = "legal"
class ParcelType(StrEnum):
DOC = "doc"
PARCEL = "parcel"
class DeliveryRequest(BaseModel):
entity: DeliveryEntity
from_city: str = Field(min_length=1)
@@ -19,3 +24,4 @@ class DeliveryRequest(BaseModel):
length_cm: float = Field(gt=0)
width_cm: float = Field(gt=0)
height_cm: float = Field(gt=0)
parcel_type: ParcelType | None = None