001 Project structure

This commit is contained in:
Раис Юсупалиев
2026-03-07 13:23:59 +03:00
parent ff319170a2
commit adfa3e26de
33 changed files with 382 additions and 18 deletions
+20
View File
@@ -0,0 +1,20 @@
"""Input schemas for price calculation."""
from enum import StrEnum
from pydantic import BaseModel, Field
class DeliveryEntity(StrEnum):
INDIVIDUAL = "individual"
LEGAL = "legal"
class DeliveryRequest(BaseModel):
entity: DeliveryEntity
from_city: str = Field(min_length=1)
to_city: str = Field(min_length=1)
weight_kg: float = Field(gt=0)
length_cm: float = Field(gt=0)
width_cm: float = Field(gt=0)
height_cm: float = Field(gt=0)