Add data model for Parameter
				
					
				
			This commit is contained in:
		
							parent
							
								
									4e131b09b5
								
							
						
					
					
						commit
						c045aabadc
					
				
					 1 changed files with 21 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -36,6 +36,27 @@ from sqlalchemy.ext.associationproxy import association_proxy
 | 
			
		|||
Base = declarative_base()
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@six.python_2_unicode_compatible
 | 
			
		||||
class Parameter(Base):
 | 
			
		||||
    """
 | 
			
		||||
    Represents a "parameter" value.
 | 
			
		||||
    """
 | 
			
		||||
    __tablename__ = 'parameters'
 | 
			
		||||
 | 
			
		||||
    store_id = sa.Column(sa.SmallInteger(), primary_key=True, nullable=False)
 | 
			
		||||
 | 
			
		||||
    lane_id = sa.Column(sa.SmallInteger(), primary_key=True, nullable=False)
 | 
			
		||||
 | 
			
		||||
    param_key = sa.Column(sa.String(length=100), primary_key=True, nullable=False)
 | 
			
		||||
 | 
			
		||||
    param_value = sa.Column(sa.String(length=255), nullable=True)
 | 
			
		||||
 | 
			
		||||
    is_array = sa.Column(sa.Boolean(), nullable=True)
 | 
			
		||||
 | 
			
		||||
    def __str__(self):
 | 
			
		||||
        return "{}-{} {}".format(self.store_id, self.lane_id, self.param_key)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@six.python_2_unicode_compatible
 | 
			
		||||
class Department(Base):
 | 
			
		||||
    """
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue