AnswerSubmission
The AnswerSubmission model tracks user answers to regular challenges. Table name:answer_submission
Fields
Primary key, auto-incrementing
Foreign key to
users.id (indexed)Foreign key to
challenge.id (indexed)Foreign key to
challenge_answer_box.id (indexed)User’s submitted answer
Whether the answer was correct (nullable)
Submission timestamp (indexed)
Relationships
Indexes
Composite indexes for optimized query patterns:ix_answer_submission_user_challengeon (user_id,challenge_id)ix_answer_submission_challenge_submittedon (challenge_id,submitted_at)
SummerSubmission
The SummerSubmission model tracks user answers to summer competition challenges. Table name:summer_submission
Fields
Primary key, auto-incrementing
Foreign key to
users.id (indexed)Foreign key to
school.id (indexed)Foreign key to
summer_challenge.id (indexed)Foreign key to
summer_challenge_answer_box.id (indexed)User’s submitted answer
Whether the answer was correct (nullable)
Submission timestamp (indexed)
Points awarded for this submission
Relationships
Indexes
Composite indexes for optimized query patterns:ix_summer_submission_user_challengeon (user_id,challenge_id)ix_summer_submission_school_pointson (school_id,points_awarded)