Add challenges preview + makefile

This commit is contained in:
2025-12-14 03:23:50 +07:00
parent 5343a8f2c3
commit bb9e9a6e1d
7 changed files with 590 additions and 37 deletions

View File

@@ -51,3 +51,40 @@ class ChallengeGenerated(BaseModel):
estimated_time: int | None = None
proof_type: str
proof_hint: str | None = None
class ChallengePreview(BaseModel):
"""Schema for challenge preview (with game info)"""
game_id: int
game_title: str
title: str
description: str
type: str
difficulty: str
points: int
estimated_time: int | None = None
proof_type: str
proof_hint: str | None = None
class ChallengesPreviewResponse(BaseModel):
"""Response with generated challenges for preview"""
challenges: list[ChallengePreview]
class ChallengeSaveItem(BaseModel):
"""Single challenge to save"""
game_id: int
title: str
description: str
type: str
difficulty: str
points: int
estimated_time: int | None = None
proof_type: str
proof_hint: str | None = None
class ChallengesSaveRequest(BaseModel):
"""Request to save previewed challenges"""
challenges: list[ChallengeSaveItem]