This commit is contained in:
2024-03-28 10:36:00 -04:00
parent 52172812cb
commit 666d0895e4
49 changed files with 225 additions and 744 deletions

26
app/classes/stats_employee.py Normal file → Executable file
View File

@@ -1,5 +1,5 @@
from app import db, ma, login_manager
from app import db, ma
from datetime import datetime
@@ -12,11 +12,10 @@ class Stats_Employee_Oil(db.Model):
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)
total_gallons_fuel = db.Column(db.INTEGER)
oil_total_profit_delivered = db.Column(db.DECIMAL(50, 2))
class Stats_Employee_Oil_schema(ma.SQLAlchemyAutoSchema):
@@ -26,8 +25,10 @@ class Stats_Employee_Oil_schema(ma.SQLAlchemyAutoSchema):
class Stats_Employee_Service(db.Model):
__tablename__ = 'stats_employee_service'
class Stats_Employee_Office(db.Model):
__tablename__ = 'stats_employee_office'
__bind_key__ = 'eamco'
__table_args__ = {"schema": "public"}
@@ -36,11 +37,12 @@ class Stats_Employee_Service(db.Model):
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):
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_Service
model = Stats_Employee_Office