020 update city code resolving

This commit is contained in:
Раис Юсупалиев
2026-03-21 10:03:46 +03:00
parent c4175121a0
commit 163f379a65
14 changed files with 45939 additions and 271 deletions
+4 -5
View File
@@ -2,7 +2,7 @@
from enum import StrEnum
from pydantic import BaseModel, Field
from pydantic import BaseModel, Field, StrictInt
class DeliveryEntity(StrEnum):
@@ -15,11 +15,10 @@ class ParcelType(StrEnum):
PARCEL = "parcel"
class DeliveryRequest(BaseModel):
class DeliveryCalculationRequest(BaseModel):
entity: DeliveryEntity
from_city: str = Field(min_length=1)
to_city: str = Field(min_length=1)
country_code: str | None = None
from_city: StrictInt
to_city: StrictInt
weight_kg: float = Field(gt=0)
length_cm: float = Field(gt=0)
width_cm: float = Field(gt=0)