47 lines
1.4 KiB
Python
47 lines
1.4 KiB
Python
|
|
from app import db, ma, login_manager
|
|
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)
|
|
|
|
total_deliveries = db.Column(db.INTEGER)
|
|
total_gallons_delivered = db.Column(db.INTEGER)
|
|
total_primes = db.Column(db.INTEGER)
|
|
total_gallons_fuel = db.Column(db.INTEGER)
|
|
oil_total_profit_delivered = db.Column(db.DECIMAL(50, 2))
|
|
|
|
class Stats_Employee_Oil_schema(ma.SQLAlchemyAutoSchema):
|
|
class Meta:
|
|
model = Stats_Employee_Oil
|
|
|
|
|
|
|
|
|
|
class Stats_Employee_Service(db.Model):
|
|
__tablename__ = 'stats_employee_service'
|
|
__bind_key__ = 'eamco'
|
|
__table_args__ = {"schema": "public"}
|
|
|
|
id = db.Column(db.Integer,
|
|
primary_key=True,
|
|
autoincrement=True,
|
|
unique=False)
|
|
|
|
total_service_calls = db.Column(db.INTEGER)
|
|
total_service_calls_hours = db.Column(db.INTEGER)
|
|
total_gallons_fuel = db.Column(db.INTEGER)
|
|
total_amount_billed= db.Column(db.DECIMAL(50, 2))
|
|
total_profit_made = db.Column(db.DECIMAL(50, 2))
|
|
class Stats_Employee_Service_schema(ma.SQLAlchemyAutoSchema):
|
|
class Meta:
|
|
model = Stats_Employee_Service
|