from pydantic import BaseModel
from typing import List, Optional


class TruckEntity(BaseModel):
    id: Optional[int] = None
    name: str
    capacity: float
    volume: float
    delivery_orders: List[int] = []

    class Config:
        from_attributes = True
