Skip to content

Commit

Permalink
✨ judge recipe struct
Browse files Browse the repository at this point in the history
  • Loading branch information
comavius committed Oct 28, 2024
1 parent bff0d7b commit 0890141
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
1 change: 1 addition & 0 deletions judge-control-app/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
mod custom_file;
mod remote_exec;
mod text_resource_repository;
mod models;

fn main() {
println!("Hello, world!");
Expand Down
1 change: 1 addition & 0 deletions judge-control-app/src/models.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pub mod judge_recipe;
28 changes: 28 additions & 0 deletions judge-control-app/src/models/judge_recipe.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
pub struct Execution {
pub optional_info: Option<OptionalInfo>,
pub shell_script_id: uuid::Uuid,
pub directory_count: f64,
pub text_resource_count: f64,
pub one_time_text_count: f64,
}

pub struct ExecutionConfigMap {
pub text_resource_ids: Option<Vec<uuid::Uuid>>,
pub one_time_text_contents: Option<Vec<String>>,
}
pub struct Judge {
pub judge_id: uuid::Uuid,
pub test_count: f64,
pub before_test_execs: Execution,
pub on_test_execs: Execution,
pub after_test_execs: Execution,
pub before_test_config_map: ExecutionConfigMap,
pub on_test_config_maps: Vec<ExecutionConfigMap>,
pub after_test_config_map: ExecutionConfigMap,
}

pub struct OptionalInfo {
pub exec_time: Option<f64>,
pub memory_size: Option<f64>,
pub language: Option<String>,
}

0 comments on commit 0890141

Please sign in to comment.