from pydantic import BaseModel
from datetime import datetime
from typing import List, Optional


class TotalOrderEntity(BaseModel):
    id: Optional[int] = None
    order_datetime: datetime
    count_robots: int
    deadline: Optional[datetime] = None
    price: float
    user_id: int
    status_id: int
    user_login: Optional[str] = None
    status_name: Optional[str] = None
    delivery_orders: Optional[List[int]] = None

    class Config:
        from_attributes = True
