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

13
models.py Normal file
View File

@@ -0,0 +1,13 @@
from sqlalchemy import Column, Integer, String, Float
from database import Base
# from .database import Base
class CityWeather(Base):
__tablename__ = "citys"
id = Column(Integer, primary_key=True, index=True)
city_name = Column(String(50), unique=True, index=True, nullable=False)
temperature = Column(Float, nullable=False)
weather = Column(String(100))
other_info = Column(String(200))