15 lines
399 B
Python
15 lines
399 B
Python
"""Output schemas for aggregated prices."""
|
|
|
|
from decimal import Decimal
|
|
|
|
from pydantic import BaseModel, Field
|
|
|
|
|
|
class DeliveryPrice(BaseModel):
|
|
provider: str = Field(min_length=1)
|
|
service_name: str = Field(min_length=1)
|
|
price: Decimal = Field(gt=0)
|
|
currency: str = Field(min_length=3, max_length=3)
|
|
delivery_days_min: int = Field(ge=0)
|
|
delivery_days_max: int = Field(ge=0)
|