Files
eamco_office_api/app/classes/stats_customer.py

33 lines
881 B
Python
Executable File

from app import db, ma, login_manager
from datetime import datetime
class Stats_Customer(db.Model):
__tablename__ = 'stats_customer'
__bind_key__ = 'eamco'
__table_args__ = {"schema": "public"}
id = db.Column(db.Integer,
primary_key=True,
autoincrement=True,
unique=False)
total_calls = db.Column(db.INTEGER)
service_calls_total = db.Column(db.INTEGER)
service_calls_total_spent = db.Column(db.DECIMAL(50, 2))
service_calls_total_profit = db.Column(db.DECIMAL(50, 2))
oil_deliveries = db.Column(db.INTEGER)
oil_total_gallons = db.Column(db.INTEGER)
oil_total_spent = db.Column(db.DECIMAL(50, 2))
oil_total_profit = db.Column(db.DECIMAL(50, 2))
class Stats_Customer_schema(ma.SQLAlchemyAutoSchema):
class Meta:
model = Stats_Customer