49 lines
1.5 KiB
Python
49 lines
1.5 KiB
Python
from app import db, ma
|
|
from datetime import datetime, timezone
|
|
|
|
|
|
class Money_delivery(db.Model):
|
|
__tablename__ = 'money_delivery'
|
|
__bind_key__ = 'eamco'
|
|
__table_args__ = {"schema": "public"}
|
|
|
|
id = db.Column(db.Integer,
|
|
primary_key=True,
|
|
autoincrement=True,
|
|
unique=False)
|
|
|
|
delivery_id = db.Column(db.INTEGER)
|
|
time_added = db.Column(db.TIMESTAMP(), default=datetime.utcnow())
|
|
gallons_delivered = db.Column(db.DECIMAL(50, 2))
|
|
supplier_price = db.Column(db.DECIMAL(50, 2))
|
|
customer_price = db.Column(db.DECIMAL(50, 2))
|
|
|
|
total_amount_oil = db.Column(db.DECIMAL(50, 2))
|
|
total_amount_prime = db.Column(db.DECIMAL(50, 2))
|
|
total_amount_same_day = db.Column(db.DECIMAL(50, 2))
|
|
total_amount_fee = db.Column(db.DECIMAL(50, 2))
|
|
total_amount = db.Column(db.DECIMAL(50, 2))
|
|
total_profit_oil = db.Column(db.DECIMAL(50, 2))
|
|
taxes_paid = db.Column(db.DECIMAL(50, 2))
|
|
total_profit = db.Column(db.DECIMAL(50, 2))
|
|
|
|
|
|
class Money_delivery_schema(ma.SQLAlchemyAutoSchema):
|
|
class Meta:
|
|
model = Money_delivery
|
|
|
|
|
|
|
|
class Pricing_Taxes(db.Model):
|
|
__tablename__ = 'pricing_taxes'
|
|
__bind_key__ = 'eamco'
|
|
__table_args__ = {"schema": "public"}
|
|
|
|
id = db.Column(db.Integer,
|
|
primary_key=True,
|
|
autoincrement=True,
|
|
unique=False)
|
|
state_id = db.Column(db.Integer)
|
|
taxes_oil = db.Column(db.DECIMAL(50, 2))
|
|
taxes_other = db.Column(db.DECIMAL(50, 2))
|