Add ScaleItem model
				
					
				
			This commit is contained in:
		
							parent
							
								
									5f3ad79a95
								
							
						
					
					
						commit
						6ecfbf4e1a
					
				
					 1 changed files with 59 additions and 0 deletions
				
			
		| 
						 | 
					@ -467,6 +467,65 @@ class VendorItem(Base):
 | 
				
			||||||
    modified = sa.Column(sa.DateTime(), nullable=True)
 | 
					    modified = sa.Column(sa.DateTime(), nullable=True)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class ScaleItem(Base):
 | 
				
			||||||
 | 
					    """
 | 
				
			||||||
 | 
					    Represents deli scale info for a given item.
 | 
				
			||||||
 | 
					    """
 | 
				
			||||||
 | 
					    __tablename__ = 'scaleItems'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    plu = sa.Column(sa.String(length=13), primary_key=True, nullable=False)
 | 
				
			||||||
 | 
					    product = orm.relationship(
 | 
				
			||||||
 | 
					        Product,
 | 
				
			||||||
 | 
					        primaryjoin=Product.upc == plu,
 | 
				
			||||||
 | 
					        foreign_keys=[plu],
 | 
				
			||||||
 | 
					        doc="""
 | 
				
			||||||
 | 
					        Reference to the :class:`Product` to which this record applies.
 | 
				
			||||||
 | 
					        """,
 | 
				
			||||||
 | 
					        backref=orm.backref(
 | 
				
			||||||
 | 
					            'scale_item',
 | 
				
			||||||
 | 
					            uselist=False,
 | 
				
			||||||
 | 
					            doc="""
 | 
				
			||||||
 | 
					            Reference to the :class:`ScaleItem` record for this product.
 | 
				
			||||||
 | 
					            """))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    price = sa.Column(sa.Numeric(precision=10, scale=2), nullable=True)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    item_description = sa.Column('itemdesc', sa.String(length=100), nullable=True)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    exception_price = sa.Column('exceptionprice', sa.Numeric(precision=10, scale=2), nullable=True)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    exception_price = sa.Column('exceptionprice', sa.Numeric(precision=10, scale=2), nullable=True)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    weight = sa.Column(sa.SmallInteger(), nullable=True, default=0)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    by_count = sa.Column('bycount', sa.Boolean(), nullable=True, default=False)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    tare = sa.Column(sa.Float(), nullable=True, default=0)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    shelf_life = sa.Column('shelflife', sa.SmallInteger(), nullable=True, default=0)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    net_weight = sa.Column('netWeight', sa.SmallInteger(), nullable=True, default=0)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    text = sa.Column(sa.Text(), nullable=True)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    reporting_class = sa.Column('reportingClass', sa.String(length=6), nullable=True)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    label = sa.Column(sa.Integer(), nullable=True)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    graphics = sa.Column(sa.Integer(), nullable=True)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    modified = sa.Column(sa.DateTime(), nullable=True)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    # TODO: this was not in some older DBs
 | 
				
			||||||
 | 
					    # linked_plu = sa.Column('linkedPLU', sa.String(length=13), nullable=True)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    # TODO: this was not in some older DBs
 | 
				
			||||||
 | 
					    # mosa_statement = sa.Column('mosaStatement', sa.Boolean(), nullable=True, default=False)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    # TODO: this was not in some older DBs
 | 
				
			||||||
 | 
					    # origin_text = sa.Column('originText', sa.String(length=100), nullable=True)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class Employee(Base):
 | 
					class Employee(Base):
 | 
				
			||||||
    """
 | 
					    """
 | 
				
			||||||
    Represents an employee within the organization.
 | 
					    Represents an employee within the organization.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue