'update
This commit is contained in:
16
schemas.py
Normal file
16
schemas.py
Normal 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
|
||||
Reference in New Issue
Block a user