Initial commit: Modernes Harry Potter Escape Quiz Portal (FastAPI & MariaDB)

This commit is contained in:
kobold-ai
2026-09-21 11:29:18 +02:00
commit c3a21369ef
50 changed files with 3346 additions and 0 deletions
Executable
+41
View File
@@ -0,0 +1,41 @@
from pydantic import BaseModel
from typing import Optional, List
class GameStartResponse(BaseModel):
session_id: str
question_number: int
total_questions: int
category: str
question: str
score: int
attempts_used: int
max_attempts: int = 3
class GameCheckRequest(BaseModel):
session_id: str
answer: str
class GameCheckResponse(BaseModel):
correct: bool
score: int
attempts_used: int
attempts_left: int
max_attempts: int = 3
is_finished: bool
revealed_answer: Optional[str] = None
next_question: Optional[dict] = None
class SuggestionCreateRequest(BaseModel):
frage: str
antwort: str
tipp: Optional[str] = None
name: Optional[str] = "Gast"
class QuestionAdminCreate(BaseModel):
category: str = "harry_potter"
question: str
canonical_answer: str
accepted_answers: Optional[str] = None
hint: Optional[str] = None
status: str = "active"
sort_order: int = 0