14 lines
415 B
Python
14 lines
415 B
Python
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))
|