diff --git a/app/models/auto.py b/app/models/auto.py new file mode 100644 index 0000000..0de111f --- /dev/null +++ b/app/models/auto.py @@ -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)) \ No newline at end of file diff --git a/main.py b/main.py index 5e825bb..68948b1 100644 --- a/main.py +++ b/main.py @@ -9,8 +9,9 @@ app.include_router(delivery.router) origins = [ "http://localhost:9000", - "https://localhost:5173", + "https://localhost:9511", "http://localhost", + "http://localhost:9514", ]