from pydantic import BaseModel
from typing import Optional


class AccessoryEntity(BaseModel):
    id: Optional[int] = None
    name: str
    count: Optional[int] = None
    volume: Optional[float] = None
    weight: Optional[float] = None
    period: Optional[int] = None
    city_id: Optional[int] = None
    city_name: Optional[str] = None

    class Config:
        from_attributes = True
