Changeset 08a062f in pycorepos


Ignore:
Timestamp:
07/18/19 09:44:00 (5 months ago)
Author:
Lance Edgar <ledgar@…>
Branches:
master
Children:
d2e764f
Parents:
78317b9
Message:

Add data model for ProductFlag?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • corepos/db/model.py

    r78317b9 r08a062f  
    282282
    283283
     284@six.python_2_unicode_compatible
     285class ProductFlag(Base):
     286    """
     287    Represents a product flag attribute.
     288    """
     289    __tablename__ = 'prodFlags'
     290
     291    bit_number = sa.Column(sa.SmallInteger(), primary_key=True, autoincrement=False, nullable=False, default=0)
     292
     293    description = sa.Column(sa.String(length=50), nullable=True)
     294
     295    active = sa.Column(sa.Boolean(), nullable=True, default=True)
     296
     297    def __str__(self):
     298        return self.description or ''
     299
     300
    284301class Employee(Base):
    285302    """
Note: See TracChangeset for help on using the changeset viewer.