first commit
This commit is contained in:
29
app/classes/stats_customer.py
Normal file
29
app/classes/stats_customer.py
Normal file
@@ -0,0 +1,29 @@
|
||||
|
||||
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
|
||||
Reference in New Issue
Block a user