"""Product Physical Packaging Model.""" from sqlalchemy import Column from sqlalchemy import Enum from sqlalchemy import Integer from sqlalchemy import String from ows_product_physical.connector import mysql class ProductPhysicalPackaging(mysql.BaseModel): """Product physical packaging model.""" __tablename__ = 'product_physical_packaging' packaging_id = Column( 'id', Integer, primary_key=True, autoincrement=True, nullable=False) name = Column(String, nullable=False) display_flag = Column(Enum('Y', 'N'), default='Y') def to_dict(self): """Dict representation of a ProductPhysicalPackaging row.""" return { 'id': self.packaging_id, 'name': self.name }