From c2150ae1544d970c6bea82e472a17e765a484cc1 Mon Sep 17 00:00:00 2001 From: comavius Date: Mon, 28 Oct 2024 16:57:31 +0900 Subject: [PATCH 1/2] =?UTF-8?q?=E2=9C=A8=20judge=20result?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- judge-control-app/src/models.rs | 1 + judge-control-app/src/models/judge_result.rs | 24 ++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 judge-control-app/src/models/judge_result.rs 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..a0e7d77 --- /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: Box, +} + +pub struct TestResult { + pub status: JudgeStatus, + pub text: Option, + pub score: f64, + pub exec_time: f64, + pub memory_size: f64, +} From d1abfd29f582a0a0b9ab7aebc85c5941d2f70b9e Mon Sep 17 00:00:00 2001 From: comavius Date: Mon, 28 Oct 2024 17:06:02 +0900 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=8E=A8=20del=20box?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- judge-control-app/src/models/judge_result.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/judge-control-app/src/models/judge_result.rs b/judge-control-app/src/models/judge_result.rs index a0e7d77..be4b612 100644 --- a/judge-control-app/src/models/judge_result.rs +++ b/judge-control-app/src/models/judge_result.rs @@ -12,7 +12,7 @@ pub enum JudgeStatus { pub struct SubmitResult { pub judge_id: uuid::Uuid, pub test_results: Vec, - pub total_result: Box, + pub total_result: TestResult, } pub struct TestResult {