28 lines
816 B
Python
Executable File
28 lines
816 B
Python
Executable File
from app import db, ma
|
|
from datetime import datetime
|
|
|
|
|
|
|
|
class Delivery_Payment(db.Model):
|
|
__tablename__ = 'delivery_payment'
|
|
__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())
|
|
total_amount_oil = db.Column(db.DECIMAL(6, 2))
|
|
total_amount_emergency = db.Column(db.DECIMAL(6, 2))
|
|
total_amount_prime = db.Column(db.DECIMAL(6, 2))
|
|
total_amount_fee = db.Column(db.DECIMAL(6, 2))
|
|
total_amount = db.Column(db.DECIMAL(6, 2))
|
|
|
|
class Delivery_Payment_schema(ma.SQLAlchemyAutoSchema):
|
|
class Meta:
|
|
model = Delivery_Payment
|
|
|