diff --git a/rattail/db/extension/model.py b/rattail/db/extension/model.py index 2b34feddcbc7ed34b5e619550adb954594deaa63..9e4c2934433a6a2033be114c85a24ffb82fe4442 100644 --- a/rattail/db/extension/model.py +++ b/rattail/db/extension/model.py @@ -587,6 +587,7 @@ class Product(Base): uuid = uuid_column() upc = Column(BigInteger, index=True) department_uuid = Column(String(32), ForeignKey('departments.uuid')) + subdepartment_uuid = Column(String(32), ForeignKey('subdepartments.uuid')) category_uuid = Column(String(32), ForeignKey('categories.uuid')) brand_uuid = Column(String(32), ForeignKey('brands.uuid')) description = Column(String(60)) @@ -599,6 +600,7 @@ class Product(Base): sale_price_quantity = Column(Integer) department = relationship(Department) + subdepartment = relationship(Subdepartment) category = relationship(Category) brand = relationship(Brand)