first commit
This commit is contained in:
0
app/models/__init__.py
Normal file
0
app/models/__init__.py
Normal file
BIN
app/models/__pycache__/__init__.cpython-312.pyc
Normal file
BIN
app/models/__pycache__/__init__.cpython-312.pyc
Normal file
Binary file not shown.
BIN
app/models/__pycache__/delivery.cpython-312.pyc
Normal file
BIN
app/models/__pycache__/delivery.cpython-312.pyc
Normal file
Binary file not shown.
BIN
app/models/__pycache__/money.cpython-312.pyc
Normal file
BIN
app/models/__pycache__/money.cpython-312.pyc
Normal file
Binary file not shown.
BIN
app/models/__pycache__/pricing.cpython-312.pyc
Normal file
BIN
app/models/__pycache__/pricing.cpython-312.pyc
Normal file
Binary file not shown.
50
app/models/delivery.py
Normal file
50
app/models/delivery.py
Normal file
@@ -0,0 +1,50 @@
|
||||
from sqlalchemy import Column, Integer,\
|
||||
DECIMAL, Text,\
|
||||
VARCHAR, TIMESTAMP, Date
|
||||
import datetime
|
||||
from database import Base
|
||||
|
||||
|
||||
class Delivery(Base):
|
||||
__tablename__ = "delivery_delivery"
|
||||
|
||||
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)
|
||||
|
||||
gallons_ordered = Column(Integer)
|
||||
customer_asked_for_fill = Column(Integer)
|
||||
gallons_delivered = Column(DECIMAL(50, 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)
|
||||
supplier_price = Column(DECIMAL(50, 2))
|
||||
customer_price = Column(DECIMAL(50, 2))
|
||||
customer_temperature = Column(DECIMAL(50, 2))
|
||||
dispatcher_notes = Column(Text())
|
||||
prime = Column(Integer)
|
||||
same_day = Column(Integer)
|
||||
payment_type = Column(Integer)
|
||||
payment_card_id = Column(Integer)
|
||||
cash_recieved = Column(DECIMAL(50, 2))
|
||||
|
||||
driver_employee_id = Column(Integer)
|
||||
driver_first_name = Column(VARCHAR(140))
|
||||
driver_last_name = Column(VARCHAR(140))
|
||||
|
||||
pre_charge_amount = Column(DECIMAL(50, 2))
|
||||
total_price = Column(DECIMAL(50, 2))
|
||||
final_price = Column(DECIMAL(50, 2))
|
||||
28
app/models/money.py
Normal file
28
app/models/money.py
Normal file
@@ -0,0 +1,28 @@
|
||||
from sqlalchemy import Column, Integer,\
|
||||
DECIMAL, Text,\
|
||||
VARCHAR, TIMESTAMP, Date
|
||||
from datetime import datetime, timezone
|
||||
from database import Base
|
||||
|
||||
|
||||
class MoneyDelivery(Base):
|
||||
__tablename__ = 'money_delivery'
|
||||
|
||||
id = Column(Integer,
|
||||
primary_key=True,
|
||||
autoincrement=True,
|
||||
unique=False)
|
||||
|
||||
delivery_id = Column(Integer)
|
||||
time_added = Column(TIMESTAMP(), default=datetime.utcnow())
|
||||
gallons_delivered = Column(DECIMAL(50, 2))
|
||||
supplier_price = Column(DECIMAL(50, 2))
|
||||
customer_price = Column(DECIMAL(50, 2))
|
||||
total_amount_oil = Column(DECIMAL(50, 2))
|
||||
total_amount_prime = Column(DECIMAL(50, 2))
|
||||
total_amount_same_day = Column(DECIMAL(50, 2))
|
||||
total_amount_fee = Column(DECIMAL(50, 2))
|
||||
total_amount = Column(DECIMAL(50, 2))
|
||||
taxes_paid = Column(DECIMAL(50, 2))
|
||||
total_profit = Column(DECIMAL(50, 2))
|
||||
total_profit_oil = Column(DECIMAL(50, 2))
|
||||
34
app/models/pricing.py
Normal file
34
app/models/pricing.py
Normal file
@@ -0,0 +1,34 @@
|
||||
from sqlalchemy import (Column, Integer, DECIMAL, TIMESTAMP)
|
||||
from datetime import datetime, timezone
|
||||
from database import Base
|
||||
|
||||
|
||||
class Pricing_Oil_Oil(Base):
|
||||
__tablename__ = 'pricing_oil_oil'
|
||||
|
||||
|
||||
id = Column(Integer,
|
||||
primary_key=True,
|
||||
autoincrement=True,
|
||||
unique=False)
|
||||
|
||||
price_from_supplier = Column(DECIMAL(50, 2))
|
||||
price_for_customer = Column(DECIMAL(50, 2))
|
||||
price_for_employee = Column(DECIMAL(50, 2))
|
||||
price_same_day = Column(DECIMAL(50, 2))
|
||||
price_prime = Column(DECIMAL(50, 2))
|
||||
date = Column(TIMESTAMP(), default=datetime.utcnow())
|
||||
|
||||
|
||||
|
||||
class Pricing_Taxes(Base):
|
||||
__tablename__ = 'taxes_pricing'
|
||||
|
||||
|
||||
id = Column(Integer,
|
||||
primary_key=True,
|
||||
autoincrement=True,
|
||||
unique=False)
|
||||
state_id = Column(Integer)
|
||||
taxes_oil = Column(DECIMAL(50, 2))
|
||||
taxes_other = Column(DECIMAL(50, 2))
|
||||
Reference in New Issue
Block a user