Feature: 40 bilingual questions, random 10 game run, difficulty levels, and full i18n support
This commit is contained in:
+14
-2
@@ -7,12 +7,22 @@ class Question(Base):
|
||||
|
||||
id = Column(Integer, primary_key=True, index=True, autoincrement=True)
|
||||
category = Column(String(50), default="harry_potter", index=True)
|
||||
difficulty = Column(String(20), default="medium", index=True) # easy, medium, hard
|
||||
question_type = Column(String(20), default="text") # 'text' or 'multiple_choice'
|
||||
|
||||
# German content (default)
|
||||
question = Column(Text, nullable=False)
|
||||
canonical_answer = Column(String(255), nullable=False)
|
||||
accepted_answers = Column(Text, nullable=True) # JSON or comma-delimited
|
||||
question_type = Column(String(20), default="text") # 'text' or 'multiple_choice'
|
||||
options = Column(Text, nullable=True) # JSON list of options for multiple choice
|
||||
hint = Column(Text, nullable=True)
|
||||
|
||||
# English content
|
||||
question_en = Column(Text, nullable=True)
|
||||
answer_en = Column(String(255), nullable=True)
|
||||
options_en = Column(Text, nullable=True) # JSON list of options in English
|
||||
hint_en = Column(Text, nullable=True)
|
||||
|
||||
accepted_answers = Column(Text, nullable=True) # JSON or comma-delimited
|
||||
status = Column(String(30), default="active", index=True) # active, needs_review, rejected, archived
|
||||
submitted_by = Column(String(100), nullable=True)
|
||||
sort_order = Column(Integer, default=0)
|
||||
@@ -29,6 +39,8 @@ class QuizSession(Base):
|
||||
question_ids = Column(Text, nullable=False) # JSON array string: "[1, 2, 3...]"
|
||||
attempts_current = Column(Integer, default=0)
|
||||
is_finished = Column(Boolean, default=False)
|
||||
lang = Column(String(10), default="de") # 'de' or 'en'
|
||||
difficulty = Column(String(20), default="all") # 'all', 'easy', 'medium', 'hard'
|
||||
created_at = Column(DateTime, default=datetime.datetime.utcnow)
|
||||
finished_at = Column(DateTime, nullable=True)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user