feat: a lot of a lot
This commit is contained in:
@@ -13,7 +13,7 @@ class WildberriesProduct(BaseModel):
|
||||
marketplace: Mapped["Marketplace"] = relationship()
|
||||
|
||||
product_id: Mapped[int] = mapped_column(ForeignKey('products.id'), primary_key=True)
|
||||
product: Mapped["Product"] = relationship()
|
||||
product: Mapped["Product"] = relationship(back_populates='wildberries_products')
|
||||
|
||||
nm_uuid: Mapped[str] = mapped_column(nullable=False)
|
||||
|
||||
|
||||
@@ -35,6 +35,10 @@ class Product(BaseModel):
|
||||
lazy='selectin',
|
||||
cascade="all, delete-orphan")
|
||||
|
||||
wildberries_products = relationship('WildberriesProduct',
|
||||
back_populates='product',
|
||||
cascade="all, delete-orphan",
|
||||
uselist=True)
|
||||
|
||||
|
||||
class ProductImage(BaseModel):
|
||||
|
||||
Reference in New Issue
Block a user