50 lines
1.3 KiB
Python
Executable File
50 lines
1.3 KiB
Python
Executable File
|
|
from app import db, ma
|
|
from datetime import datetime
|
|
|
|
|
|
class Stats_Employee_Oil(db.Model):
|
|
__tablename__ = 'stats_employee_oil'
|
|
__bind_key__ = 'eamco'
|
|
__table_args__ = {"schema": "public"}
|
|
|
|
id = db.Column(db.Integer,
|
|
primary_key=True,
|
|
autoincrement=True,
|
|
unique=False)
|
|
employee_id = db.Column(db.INTEGER)
|
|
total_deliveries = db.Column(db.INTEGER)
|
|
total_gallons_delivered = db.Column(db.INTEGER)
|
|
total_primes = db.Column(db.INTEGER)
|
|
oil_total_profit_delivered = db.Column(db.DECIMAL(6, 2))
|
|
oil_total_money_delivered = db.Column(db.DECIMAL(6, 2))
|
|
|
|
class Stats_Employee_Oil_schema(ma.SQLAlchemyAutoSchema):
|
|
class Meta:
|
|
model = Stats_Employee_Oil
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class Stats_Employee_Office(db.Model):
|
|
__tablename__ = 'stats_employee_office'
|
|
__bind_key__ = 'eamco'
|
|
__table_args__ = {"schema": "public"}
|
|
|
|
id = db.Column(db.Integer,
|
|
primary_key=True,
|
|
autoincrement=True,
|
|
unique=False)
|
|
|
|
employee_id = db.Column(db.INTEGER)
|
|
total_orders = db.Column(db.INTEGER)
|
|
total_credit_cards_proccessed = db.Column(db.INTEGER)
|
|
|
|
class Stats_Employee_Office_schema(ma.SQLAlchemyAutoSchema):
|
|
class Meta:
|
|
model = Stats_Employee_Office
|
|
|
|
|