71 lines
2.1 KiB
Python
71 lines
2.1 KiB
Python
from sqlalchemy import (Column, Integer,DECIMAL,
|
|
String,
|
|
VARCHAR,
|
|
DATE, INTEGER)
|
|
from database import Base
|
|
|
|
|
|
class Customer_Customer(Base):
|
|
__tablename__ = 'customer_customer'
|
|
|
|
id = Column(Integer,
|
|
primary_key=True,
|
|
autoincrement=True,
|
|
unique=False)
|
|
|
|
account_number = Column(VARCHAR(25))
|
|
customer_last_name = Column(VARCHAR(250))
|
|
customer_first_name = Column(VARCHAR(250))
|
|
customer_town = Column(VARCHAR(140))
|
|
customer_state = Column(INTEGER)
|
|
customer_zip = Column(VARCHAR(25))
|
|
customer_first_call = Column(DATE())
|
|
customer_email = Column(VARCHAR(500))
|
|
customer_automatic = Column(INTEGER)
|
|
customer_phone_number = Column(VARCHAR(25))
|
|
customer_home_type = Column(INTEGER)
|
|
customer_apt = Column(VARCHAR(140))
|
|
customer_address = Column(VARCHAR(1000))
|
|
company_id = Column(INTEGER)
|
|
|
|
auth_net_profile_id = Column(String(100))
|
|
|
|
|
|
class Customer_estimate_gallons(Base):
|
|
__tablename__ = 'customer_estimate'
|
|
|
|
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(DATE())
|
|
days_since_last_fill = Column(INTEGER())
|
|
last_updated = Column(DATE())
|
|
estimated_gallons_left = Column(DECIMAL(6, 2))
|
|
estimated_gallons_left_prev_day = Column(DECIMAL(6, 2))
|
|
tank_height = Column(VARCHAR(25))
|
|
tank_size = Column(VARCHAR(25))
|
|
house_factor = Column(DECIMAL(5, 2))
|
|
auto_status = Column(INTEGER())
|
|
open_ticket_id = Column(Integer, nullable=True)
|
|
hot_water_summer = Column(INTEGER())
|
|
|
|
|
|
class Customer_Update(Base):
|
|
__tablename__ = 'customer_update'
|
|
|
|
id = Column(Integer,
|
|
primary_key=True,
|
|
autoincrement=True,
|
|
unique=False)
|
|
|
|
last_updated = Column(DATE())
|