Models and Database Schema¶
Base Models¶
Contest¶
- class
judge.models.Contest(*args, **kwargs)¶Model for Contest.
name¶Contest name
start_datetime¶Start Date and Time for Contest
soft_end_datetime¶“Soft” End Date and Time for Contest
hard_end_datetime¶“Hard” End Date and Time for Contest
penalty¶Penalty for late-submission
public¶Is the contest public?
enable_linter_score¶Enable linter scoring
enable_poster_score¶Enable poster scoring
Problem¶
- class
judge.models.Problem(*args, **kwargs)¶Model for a Problem.
code¶Problem code
contest¶Foreign key to contest for the problem
name¶Problem name
statement¶Problem statement
input_format¶Problem input format
output_format¶Problem output format
difficulty¶Problem difficulty
time_limit¶Problem time limit
memory_limit¶Problem memory limit
file_exts¶Accepted file extensions for submissions to problem
starting_code¶Problem starting code
max_score¶Maximum score for a test case for the problem
compilation_script¶Problem compilation script
test_script¶Problem test script
Submission¶
- class
judge.models.Submission(*args, **kwargs)¶Model for a Submission.
problem¶Foreign key to problem for which this is a submission
participant¶Foreign key to person who submitted the solution
file_type¶File type of submission
submission_file¶Submission file
timestamp¶Timestamp of submission
judge_score¶Judge score
poster_score¶Poster score
linter_score¶Linter score
final_score¶Final score
TestCase¶
- class
judge.models.TestCase(*args, **kwargs)¶Model for TestCase. Maintains testcases and mapping between TestCase and Problem.
problem¶Foreign key to problem for which this is a test case
public¶Determines if the test case is a public test case or a private test case
inputfile¶Input file for the test case
outputfile¶Output file for the test case
Person¶
Derived Models¶
ContestPerson¶
- class
judge.models.ContestPerson(*args, **kwargs)¶Model for ContestPerson. This maps how (either as a Participant or Poster) persons have access to the contests.
contest¶Foreign key to contest in which this person is taking part
person¶Foreign key to the actual person
role¶Determines if Person is a Poster or a Participant
SubmissionTestCase¶
- class
judge.models.SubmissionTestCase(*args, **kwargs)¶Model for SubmissionTestCase. Maintains mapping between TestCase and Submission.
submission¶Foreign key to submission
testcase¶Foreign key to test case
verdict¶Verdict by the judge
memory_taken¶Virtual memory consumed by the submission
time_taken¶Time taken by the submission
message¶Message placeholder, used for erroneous submissions