from pydantic import BaseModel
from typing import Optional


class CityEntity(BaseModel):
    id: Optional[int] = None
    name: str
    x_coordinate: Optional[float] = None
    y_coordinate: Optional[float] = None
    federal_district_id: Optional[int] = None
    federal_district_name: Optional[str] = None

    class Config:
        from_attributes = True
