diff --git a/corepos/db/model.py b/corepos/db/model.py index 819f78d..a72c6b9 100644 --- a/corepos/db/model.py +++ b/corepos/db/model.py @@ -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): """