This commit is contained in:
Martin
2016-07-10 23:41:51 +02:00
parent 9ae2fea044
commit 663b07fe47
3 changed files with 8 additions and 6 deletions
+1
View File
@@ -1,5 +1,6 @@
# coding=UTF-8 # coding=UTF-8
class ValidationError(Exception): class ValidationError(Exception):
def __init__(self, message): def __init__(self, message):
+5 -4
View File
@@ -27,7 +27,8 @@ class Material(db.Model):
query_class = MaterialQuery query_class = MaterialQuery
WALLPAPER_MATERIALS = ['standard-wallpaper', 'self-adhesive-wallpaper', 'premium-wallpaper'] WALLPAPER_MATERIALS = ['standard-wallpaper',
'self-adhesive-wallpaper', 'premium-wallpaper']
CANVAS_MATERIALS = ['standard-canvas'] CANVAS_MATERIALS = ['standard-canvas']
id = db.Column('materialid', db.Integer, primary_key=True) id = db.Column('materialid', db.Integer, primary_key=True)
@@ -53,11 +54,11 @@ class Material(db.Model):
class MaterialPrice(db.Model): class MaterialPrice(db.Model):
__tablename__ = 'v_materialprice'; __tablename__ = 'v_materialprice'
groupid = db.Column(db.Integer) groupid = db.Column(db.Integer)
materialid = db.Column(db.Integer, db.ForeignKey('product-materials.materialid')) materialid = db.Column(db.Integer, db.ForeignKey(
'product-materials.materialid'))
price = db.Column(db.Numeric) price = db.Column(db.Numeric)
__table_args__ = (db.PrimaryKeyConstraint(groupid, materialid),) __table_args__ = (db.PrimaryKeyConstraint(groupid, materialid),)