Initial commit
This commit is contained in:
12
models.py
Normal file
12
models.py
Normal file
@ -0,0 +1,12 @@
|
||||
from sqlalchemy import Column, Integer, String, Float, DateTime
|
||||
from db import Base
|
||||
from datetime import datetime
|
||||
|
||||
class WeatherRecord(Base):
|
||||
__tablename__ = "weather"
|
||||
|
||||
id = Column(Integer, primary_key=True, index=True)
|
||||
city = Column(String, index=True)
|
||||
temperature = Column(Float)
|
||||
windspeed = Column(Float)
|
||||
time = Column(DateTime, default=datetime.utcnow)
|
Reference in New Issue
Block a user