PW-567 add the old canvas formula
This commit is contained in:
@@ -1,9 +1,24 @@
|
||||
# coding=UTF-8
|
||||
|
||||
from flask_sqlalchemy import BaseQuery
|
||||
from api import db
|
||||
|
||||
|
||||
class ContractCustomerQuery(BaseQuery):
|
||||
|
||||
def reseller_store(self, url, territory):
|
||||
return self.filter(
|
||||
ContractCustomer.dealerstore == True,
|
||||
ContractCustomer.dealerurl == url,
|
||||
ContractCustomer.country == territory).first()
|
||||
|
||||
|
||||
class ContractCustomer(db.Model):
|
||||
|
||||
__tablename__ = 'contract_customers'
|
||||
|
||||
query_class = ContractCustomerQuery
|
||||
|
||||
id = db.Column('contractcustomerid', db.Integer, primary_key=True)
|
||||
country = db.Column(db.String(2))
|
||||
pricepremium = db.Column(db.Numeric, nullable=False, default=0)
|
||||
|
||||
Reference in New Issue
Block a user