updated classes
This commit is contained in:
68
app/models/auto.py
Normal file
68
app/models/auto.py
Normal file
@@ -0,0 +1,68 @@
|
||||
from sqlalchemy import Column, Integer,\
|
||||
DECIMAL, Text,\
|
||||
VARCHAR, TIMESTAMP, Date, INTEGER
|
||||
from datetime import datetime, timezone
|
||||
from database import Base
|
||||
|
||||
|
||||
|
||||
|
||||
class Auto_Customer(Base):
|
||||
__tablename__ = 'auto_temp'
|
||||
|
||||
id = Column(Integer,
|
||||
primary_key=True,
|
||||
autoincrement=True,
|
||||
unique=False)
|
||||
customer_id = Column(INTEGER())
|
||||
customer_full_name = Column(VARCHAR(250))
|
||||
last_fill = Column(TIMESTAMP(), default=datetime.utcnow())
|
||||
last_updated = Column(TIMESTAMP(), default=datetime.utcnow())
|
||||
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))
|
||||
|
||||
|
||||
|
||||
|
||||
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(5, 2))
|
||||
temp_max = Column(DECIMAL(5, 2))
|
||||
temp_min = Column(DECIMAL(5, 2))
|
||||
temp_avg = Column(DECIMAL(5, 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))
|
||||
Reference in New Issue
Block a user