Download app/schemas/admin/category.py from binhugg2/api: direct link, hf CLI and curl.
- Browser
- Download file 478 Bytes
-
https://huggingface.co/spaces/binhugg2/api/resolve/main/app/schemas/admin/category.py
- Command line
-
hf download hf://spaces/binhugg2/api/app/schemas/admin/category.py
-
curl -L -o category.py https://huggingface.co/spaces/binhugg2/api/resolve/main/app/schemas/admin/category.py
478 Bytes
| from pydantic import BaseModel, Field | |
| class CategoryUpdateRequest(BaseModel): | |
| name: str | None = Field(None, min_length=1, max_length=50) | |
| sort_order: int | None = Field(None, ge=0) | |
| is_active: bool | None = None | |
| parent_id: int | None = None | |
| class CategoryMappingItem(BaseModel): | |
| category_id: int | |
| source_type_id: int | |
| class CategoryMappingUpdateRequest(BaseModel): | |
| source_id: int | |
| mappings: list[CategoryMappingItem] = Field(..., min_length=1) | |