12 lines
222 B
Python
12 lines
222 B
Python
from pydantic import BaseModel
|
|
from typing import Optional
|
|
|
|
|
|
class CityEntity(BaseModel):
|
|
id: Optional[int]
|
|
name: str
|
|
federal_district_id: Optional[int] = None
|
|
|
|
class Config:
|
|
from_attributes = True
|