From 2e278a4025d28a2ea849eeadf495d5bee5e32f3e Mon Sep 17 00:00:00 2001 From: aaron <> Date: Sat, 11 Jan 2025 23:28:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=95=86=E5=AE=B6=E5=95=86?= =?UTF-8?q?=E5=93=81=E6=8E=A5=E5=8F=A3=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/merchant_product.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/app/models/merchant_product.py b/app/models/merchant_product.py index 286835a..8831cb3 100644 --- a/app/models/merchant_product.py +++ b/app/models/merchant_product.py @@ -13,7 +13,6 @@ class MerchantProductDB(Base): id = Column(Integer, primary_key=True, autoincrement=True) merchant_id = Column(Integer, ForeignKey("merchants.id", ondelete="CASCADE"), index=True) name = Column(String(100), nullable=False) - category_id = Column(Integer, ForeignKey("merchant_product_categories.id"), nullable=False) image_url = Column(String(500), nullable=False) product_price = Column(Float, nullable=False) # 原价 sale_price = Column(Float, nullable=False) # 售价 @@ -28,7 +27,6 @@ class MerchantProductDB(Base): class MerchantProductCreate(BaseModel): merchant_id: int name: str = Field(..., max_length=100) - category_id: int image_url: str = Field(..., max_length=500) product_price: float = Field(..., gt=0) sale_price: float = Field(..., gt=0) @@ -38,7 +36,6 @@ class MerchantProductCreate(BaseModel): class MerchantProductUpdate(BaseModel): name: Optional[str] = Field(None, max_length=100) - category_id: Optional[int] = None image_url: Optional[str] = Field(None, max_length=500) product_price: Optional[float] = Field(None, gt=0) sale_price: Optional[float] = Field(None, gt=0) @@ -50,8 +47,6 @@ class MerchantProductInfo(BaseModel): id: int merchant_id: int name: str - category_id: int - category_name: str # 通过关联查询获取 image_url: str product_price: float sale_price: float