shop product refactoring
This commit is contained in:
@@ -6,7 +6,7 @@ from pydantic import BaseModel, ConfigDict, Field, field_validator
|
||||
from models.schemas.marketplace_product import MarketplaceProductResponse
|
||||
|
||||
class ProductCreate(BaseModel):
|
||||
marketplace_product_id: str = Field(..., description="MarketplaceProduct ID to add to shop")
|
||||
marketplace_product_id: str = Field(..., description="MarketplaceProduct ID to add to vendor ")
|
||||
product_id: Optional[str] = None
|
||||
price: Optional[float] = None # Removed: ge=0 constraint
|
||||
sale_price: Optional[float] = None # Removed: ge=0 constraint
|
||||
@@ -21,7 +21,7 @@ class ProductCreate(BaseModel):
|
||||
class ProductResponse(BaseModel):
|
||||
model_config = ConfigDict(from_attributes=True)
|
||||
id: int
|
||||
shop_id: int
|
||||
vendor_id: int
|
||||
marketplace_product: MarketplaceProductResponse
|
||||
product_id: Optional[str]
|
||||
price: Optional[float]
|
||||
|
||||
Reference in New Issue
Block a user