Skip to content

Commit bfee3a0

Browse files
committed
add product variant to Item model
1 parent fd392ae commit bfee3a0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

models/base.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ class Item(Base):
127127
user_id = Column(Integer, ForeignKey("user.id"))
128128
brand_id = Column(Integer, ForeignKey("brand.id"))
129129
product_id = Column(Integer, ForeignKey("product.id"))
130+
product_variant_id = Column(Integer, ForeignKey("productvariant.id"))
130131
category_id = Column(Integer, ForeignKey("itemcategory.id"))
131132
sort_order = Column(Integer, default=0)
132133
removed = Column(Boolean, default=False)
@@ -147,6 +148,7 @@ class Item(Base):
147148
# Relationships
148149
brand = relationship("Brand", lazy="joined")
149150
product = relationship("Product", lazy="joined")
151+
product_variant = relationship("ProductVariant", lazy="joined")
150152
category = relationship("ItemCategory",
151153
lazy="joined",
152154
foreign_keys=[category_id],

0 commit comments

Comments
 (0)