first commit

This commit is contained in:
2024-07-15 17:55:45 -04:00
commit 853529b871
23 changed files with 454 additions and 0 deletions

46
app/models/auto.py Normal file
View File

@@ -0,0 +1,46 @@
from sqlalchemy import Column, Integer,\
DECIMAL, Text,\
VARCHAR, TIMESTAMP, Date, INTEGER
from datetime import datetime, timezone
from database import Base
class Auto_Temp(Base):
__tablename__ = 'auto_temp'
id = Column(Integer,
primary_key=True,
autoincrement=True,
unique=False)
todays_date = Column(TIMESTAMP(), default=datetime.utcnow())
temp = Column(DECIMAL(50, 2))
temp_max = Column(DECIMAL(50, 2))
temp_min = Column(DECIMAL(50, 2))
temp_avg = Column(DECIMAL(50, 2))
degree_day = Column(INTEGER())
class Auto_Delivery(Base):
__tablename__ = 'auto_delivery'
id = Column(Integer,
primary_key=True,
autoincrement=True,
unique=False)
customer_id = Column(INTEGER())
account_number = Column(VARCHAR(25))
customer_town = Column(VARCHAR(140))
customer_state = Column(INTEGER)
customer_address = Column(VARCHAR(1000))
customer_zip = Column(VARCHAR(25))
customer_full_name = Column(VARCHAR(250))
last_fill = Column(TIMESTAMP())
last_updated = Column(TIMESTAMP())
estimated_gallons_left = Column(INTEGER())
estimated_gallons_left_prev_day = Column(INTEGER())
tank_height = Column(VARCHAR(25))
tank_size = Column(VARCHAR(25))
house_factor = Column(DECIMAL(5, 2))