Files
hackrobot 91a606a893 'update
2024-10-05 22:58:38 +08:00

17 lines
317 B
Python

from pydantic import BaseModel
class CityWeatherBase(BaseModel):
city_name: str
temperature: float
weather: str | None = None
other_info: str | None = None
class CityWeatherCreate(CityWeatherBase):
pass
class CityWeather(CityWeatherBase):
id: int
class Config:
orm_mode = True