Create the database schemas and models for the problems, test cases, and submission history. This will dictate how problem data is stored in database and how our queries should be structured.
Edited
Designs
Child items ...
Show closed items
Linked items 0
Link issues together to show that they're related.
Learn more.
Problem(
val id: Int, // Unique identifier for the problem
val title: String, // Title of the problem
val description: String, // Description of the problem
val initialCode: String, // Initial code provided with bugs
val tags: List // Tags to filter problems
)
TestCase(
val id: Int, // Unique identifier for the test case
val problemId: Int, // Foreign key referencing the associated problem
val input: String, // Input for the test case
val expectedOutput: String // Expected output for the corresponding input
)
UserSubmission(
val id: Int, // Unique identifier for the user submission
val problemId: Int, // Foreign key referencing the associated problem
val userId: Int, // User who submitted the code
val submittedCode: String // Code submitted by the user
)
We may want to create a separate Tags table to store the possible Tag Types. The Problem table would contain a list of foreign keys identifying which tags should be applied when filtering.