first commit
This commit is contained in:
77
models/delivery.py
Normal file
77
models/delivery.py
Normal file
@@ -0,0 +1,77 @@
|
||||
from sqlalchemy import Column, Integer, String, Boolean, DECIMAL, TIMESTAMP, DATE, TEXT, VARCHAR
|
||||
from . import Base
|
||||
|
||||
class Delivery_Delivery(Base):
|
||||
__tablename__ = 'delivery_delivery'
|
||||
__table_args__ = {"schema": "public"}
|
||||
|
||||
id = Column(Integer, primary_key=True, autoincrement=True, unique=False)
|
||||
|
||||
customer_id = Column(Integer)
|
||||
customer_name = Column(VARCHAR(1000))
|
||||
customer_address = Column(VARCHAR(1000))
|
||||
customer_town = Column(VARCHAR(140))
|
||||
customer_state = Column(VARCHAR(140))
|
||||
customer_zip = Column(Integer)
|
||||
# how many gallons ordered
|
||||
gallons_ordered = Column(Integer)
|
||||
# if customer asked for a fill
|
||||
customer_asked_for_fill = Column(Integer)
|
||||
# integer value if delivered, waiting, cancelled etc
|
||||
gallons_delivered = Column(DECIMAL(6, 2))
|
||||
# if customer has a full tank
|
||||
customer_filled = Column(Integer)
|
||||
# integer value if delivered, waiting, cancelled etc
|
||||
# waiting = 0
|
||||
# cancelled = 1
|
||||
# out for delivery = 2
|
||||
# tommorrow = 3
|
||||
# issue = 5
|
||||
# finalized = 10
|
||||
|
||||
delivery_status = Column(Integer)
|
||||
|
||||
# when the call to order took place
|
||||
when_ordered = Column(DATE(), default=None)
|
||||
# when the delivery date happened
|
||||
when_delivered = Column(DATE(), default=None)
|
||||
# when the delivery is expected ie what day
|
||||
expected_delivery_date = Column(DATE(), default=None)
|
||||
# automatic delivery
|
||||
automatic = Column(Integer)
|
||||
automatic_id = Column(Integer)
|
||||
# OIL info and id from table
|
||||
oil_id = Column(Integer)
|
||||
supplier_price = Column(DECIMAL(6, 2))
|
||||
customer_price = Column(DECIMAL(6, 2))
|
||||
# weather
|
||||
customer_temperature = Column(DECIMAL(6, 2))
|
||||
|
||||
dispatcher_notes = Column(TEXT())
|
||||
|
||||
|
||||
prime = Column(Integer)
|
||||
same_day = Column(Integer)
|
||||
emergency = Column(Integer)
|
||||
|
||||
# cash = 0
|
||||
# credit = 1
|
||||
# credit/cash = 2
|
||||
# check = 3
|
||||
# other = 4
|
||||
payment_type = Column(Integer)
|
||||
payment_card_id = Column(Integer)
|
||||
cash_recieved = Column(DECIMAL(6, 2))
|
||||
|
||||
driver_employee_id = Column(Integer)
|
||||
driver_first_name = Column(VARCHAR(140))
|
||||
driver_last_name = Column(VARCHAR(140))
|
||||
|
||||
pre_charge_amount = Column(DECIMAL(6, 2))
|
||||
total_price = Column(DECIMAL(6, 2))
|
||||
final_price = Column(DECIMAL(6, 2))
|
||||
check_number = Column(VARCHAR(20))
|
||||
|
||||
|
||||
promo_id = Column(Integer)
|
||||
promo_money_discount = Column(DECIMAL(6, 2))
|
||||
Reference in New Issue
Block a user