added promo
This commit is contained in:
@@ -1,50 +1,79 @@
|
||||
from sqlalchemy import Column, Integer,\
|
||||
DECIMAL, Text,\
|
||||
VARCHAR, TIMESTAMP, Date
|
||||
import datetime
|
||||
from sqlalchemy import Column, TEXT, DECIMAL, INTEGER, VARCHAR, DATE
|
||||
from database import Base
|
||||
|
||||
|
||||
class Delivery(Base):
|
||||
__tablename__ = "delivery_delivery"
|
||||
|
||||
id = Column(Integer,
|
||||
id = Column(INTEGER,
|
||||
primary_key=True,
|
||||
autoincrement=True,
|
||||
unique=False)
|
||||
|
||||
customer_id = Column(Integer)
|
||||
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)
|
||||
|
||||
gallons_ordered = Column(Integer)
|
||||
customer_asked_for_fill = Column(Integer)
|
||||
gallons_delivered = Column(DECIMAL(6, 2))
|
||||
customer_filled = Column(Integer)
|
||||
|
||||
delivery_status = Column(Integer)
|
||||
when_ordered = Column(TIMESTAMP(), default=datetime.datetime.utcnow())
|
||||
when_delivered = Column(TIMESTAMP(), default=None)
|
||||
expected_delivery_date = Column(Date(), default=None)
|
||||
automatic = Column(Integer)
|
||||
oil_id = Column(Integer)
|
||||
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
|
||||
# delivered = 1
|
||||
# out for delivery = 2
|
||||
# cancelled = 3
|
||||
# partial delivery = 4
|
||||
# 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)
|
||||
payment_type = Column(Integer)
|
||||
payment_card_id = Column(Integer)
|
||||
# services
|
||||
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_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))
|
||||
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