This commit is contained in:
hackrobot
2024-10-05 22:58:38 +08:00
parent aa4f740fdd
commit 91a606a893
11 changed files with 139 additions and 0 deletions

16
schemas.py Normal file
View File

@@ -0,0 +1,16 @@
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