diff --git a/corepos/db/model.py b/corepos/db/model.py index 949d1c57327796e139ba2781465f00ea9c35098e..7bde147249ec6440bd9f5bb0d268255945c6f806 100644 --- a/corepos/db/model.py +++ b/corepos/db/model.py @@ -206,25 +206,25 @@ class Product(Base): normal_price = sa.Column(sa.Float(), nullable=True) - pricemethod = sa.Column(sa.SmallInteger(), nullable=True) + price_method = sa.Column('pricemethod', sa.SmallInteger(), nullable=True) - groupprice = sa.Column(sa.Float(), nullable=True) + group_price = sa.Column('groupprice', sa.Float(), nullable=True) quantity = sa.Column(sa.SmallInteger(), nullable=True) special_price = sa.Column(sa.Float(), nullable=True) - specialpricemethod = sa.Column(sa.SmallInteger(), nullable=True) + special_price_method = sa.Column('specialpricemethod', sa.SmallInteger(), nullable=True) - specialgroupprice = sa.Column(sa.Float(), nullable=True) + special_group_price = sa.Column('specialgroupprice', sa.Float(), nullable=True) - specialquantity = sa.Column(sa.SmallInteger(), nullable=True) + special_quantity = sa.Column('specialquantity', sa.SmallInteger(), nullable=True) start_date = sa.Column(sa.DateTime(), nullable=True) end_date = sa.Column(sa.DateTime(), nullable=True) - dept_no = sa.Column('department', sa.SmallInteger(), nullable=True) + department_number = sa.Column('department', sa.SmallInteger(), nullable=True) size = sa.Column(sa.String(length=9), nullable=True) @@ -234,37 +234,37 @@ class Product(Base): scale = sa.Column(sa.Boolean(), nullable=True) - scaleprice = sa.Column(sa.Boolean(), nullable=True, default=False) + scale_price = sa.Column('scaleprice', sa.Boolean(), nullable=True, default=False) - mixmatchcode = sa.Column(sa.String(length=13), nullable=True) + mix_match_code = sa.Column('mixmatchcode', sa.String(length=13), nullable=True) modified = sa.Column(sa.DateTime(), nullable=True) # advertised = sa.Column(sa.Boolean(), nullable=True) - tareweight = sa.Column(sa.Float(), nullable=True) + tare_weight = sa.Column('tareweight', sa.Float(), nullable=True) discount = sa.Column(sa.SmallInteger(), nullable=True) - discounttype = sa.Column(sa.SmallInteger(), nullable=True) + discount_type = sa.Column('discounttype', sa.SmallInteger(), nullable=True) line_item_discountable = sa.Column(sa.Boolean(), nullable=True) - unitofmeasure = sa.Column(sa.String(length=15), nullable=True) + unit_of_measure = sa.Column('unitofmeasure', sa.String(length=15), nullable=True) wicable = sa.Column(sa.SmallInteger(), nullable=True) - qttyEnforced = sa.Column(sa.Boolean(), nullable=True) + quantity_enforced = sa.Column('qttyEnforced', sa.Boolean(), nullable=True) - idEnforced = sa.Column(sa.Boolean(), nullable=True) + id_enforced = sa.Column('idEnforced', sa.Boolean(), nullable=True) cost = sa.Column(sa.Float(), nullable=True, default=0) - inUse = sa.Column(sa.Boolean(), nullable=True) + in_use = sa.Column('inUse', sa.Boolean(), nullable=True) - numflag = sa.Column(sa.Integer(), nullable=True, default=0) + flags = sa.Column('numflag', sa.Integer(), nullable=True, default=0) - subdept = sa.Column(sa.SmallInteger(), nullable=True) + subdepartment_number = sa.Column('subdept', sa.SmallInteger(), nullable=True) deposit = sa.Column(sa.Float(), nullable=True) @@ -278,8 +278,8 @@ class Product(Base): department = orm.relationship( Department, - primaryjoin=Department.number == dept_no, - foreign_keys=[dept_no], + primaryjoin=Department.number == department_number, + foreign_keys=[department_number], doc=""" Reference to the :class:`Department` to which the product belongs. """)