backend apis updation
This commit is contained in:
@@ -79,6 +79,27 @@ class BrandsOut(BaseModel):
|
||||
brands: List[str]
|
||||
|
||||
|
||||
class BrandCardOut(BaseModel):
|
||||
"""A brand as shown on the home page card grid.
|
||||
|
||||
`name` is the same string GET /api/brands returns, so the frontend can
|
||||
pass it straight back to /api/brands/{brand}/products.
|
||||
"""
|
||||
name: str
|
||||
slug: str
|
||||
product_count: int
|
||||
category_count: int
|
||||
categories: List[str] = Field(default_factory=list)
|
||||
image_url: Optional[str] = None
|
||||
initials: str
|
||||
|
||||
|
||||
class BrandCardsOut(BaseModel):
|
||||
total_brands: int
|
||||
total_products: int
|
||||
brands: List[BrandCardOut]
|
||||
|
||||
|
||||
class CategoriesOut(BaseModel):
|
||||
brand: str
|
||||
categories: List[str]
|
||||
|
||||
Reference in New Issue
Block a user