Spaces:
Sleeping
Sleeping
| # pydantic_models.py | |
| from pydantic import BaseModel | |
| from typing import List, Optional | |
| class ProductType(BaseModel): | |
| id: str | |
| title: str | |
| slug: str | |
| description: Optional[str] = "" | |
| productsCount: int | |
| class Category(BaseModel): | |
| id: str | |
| title: str | |
| slug: str | |
| productType: Optional[str] = None | |
| productsCount: int | |
| class Product(BaseModel): | |
| id: str | |
| title: str | |
| slug: str | |
| price: float | |
| comparativePrice: Optional[float] = None | |
| description: str | |
| tags: List[str] = [] | |
| thumbnail: Optional[str] = None | |
| images: List[str] = [] | |
| isFeatured: bool = False | |
| isNewArrival: bool = False | |
| status: Optional[str] = "" | |
| class Recommendation(BaseModel): | |
| product: Product | |
| reason: str | |