Спринт 5: Трекер результатов
- Миграция 005: user_id в test_attempts (дефолт 1 = Гость) - GET /api/attempts с фильтрами по тесту, дате и пагинацией - Страница /tracker: таблица попыток, фильтры, пагинация - Ссылка «Трекер» в шапке приложения Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -87,3 +87,29 @@ class AttemptResult(BaseModel):
|
||||
questions: list[QuestionResult]
|
||||
|
||||
model_config = {"from_attributes": True}
|
||||
|
||||
|
||||
# ── Трекер результатов ────────────────────────────────────────
|
||||
|
||||
class AttemptListItem(BaseModel):
|
||||
id: int
|
||||
test_id: int
|
||||
test_title: str
|
||||
test_version: int
|
||||
user_id: int
|
||||
user_name: str
|
||||
started_at: datetime
|
||||
finished_at: Optional[datetime]
|
||||
score: Optional[float]
|
||||
correct_count: Optional[int]
|
||||
total_count: Optional[int]
|
||||
passed: Optional[bool]
|
||||
|
||||
model_config = {"from_attributes": True}
|
||||
|
||||
|
||||
class AttemptListResponse(BaseModel):
|
||||
items: list[AttemptListItem]
|
||||
total: int
|
||||
page: int
|
||||
page_size: int
|
||||
|
||||
Reference in New Issue
Block a user