Add data model for Parameter

This commit is contained in:
Lance Edgar 2019-07-29 19:23:05 -05:00
parent 4e131b09b5
commit c045aabadc

View file

@ -36,6 +36,27 @@ from sqlalchemy.ext.associationproxy import association_proxy
Base = declarative_base() 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 @six.python_2_unicode_compatible
class Department(Base): class Department(Base):
""" """