diff --git a/judge-control-app/src/models.rs b/judge-control-app/src/models.rs index 8f29320..eb85c79 100644 --- a/judge-control-app/src/models.rs +++ b/judge-control-app/src/models.rs @@ -1 +1,2 @@ pub mod judge_recipe; +pub mod judge_result; diff --git a/judge-control-app/src/models/judge_result.rs b/judge-control-app/src/models/judge_result.rs new file mode 100644 index 0000000..be4b612 --- /dev/null +++ b/judge-control-app/src/models/judge_result.rs @@ -0,0 +1,24 @@ +pub enum JudgeStatus { + Accepted, + WrongAnswer, + TimeLimitExceeded, + MemoryLimitExceeded, + OutputLimitExceeded, + RuntimeError, + CompileError, + InternalError, +} + +pub struct SubmitResult { + pub judge_id: uuid::Uuid, + pub test_results: Vec, + pub total_result: TestResult, +} + +pub struct TestResult { + pub status: JudgeStatus, + pub text: Option, + pub score: f64, + pub exec_time: f64, + pub memory_size: f64, +}