Spaces:
Paused
Paused
Download schemas/feedback.py from TeamError404/nexus: direct link, hf CLI and curl.
- Browser
- Download file 491 Bytes
-
https://huggingface.co/spaces/TeamError404/nexus/resolve/main/schemas/feedback.py
- Command line
-
hf download hf://spaces/TeamError404/nexus/schemas/feedback.py
-
curl -L -o feedback.py https://huggingface.co/spaces/TeamError404/nexus/resolve/main/schemas/feedback.py
491 Bytes
| """ | |
| Pydantic schemas for feedback. | |
| """ | |
| from typing import Optional | |
| from uuid import UUID | |
| from datetime import datetime | |
| from pydantic import BaseModel, ConfigDict, Field | |
| class FeedbackCreate(BaseModel): | |
| rating: int = Field(..., ge=1, le=5) | |
| comment: Optional[str] = None | |
| class FeedbackResponse(BaseModel): | |
| id: UUID | |
| ticket_id: UUID | |
| user_id: UUID | |
| rating: int | |
| comment: Optional[str] | |
| created_at: datetime | |
| model_config = ConfigDict(from_attributes=True) | |