diff --git a/Cargo.lock b/Cargo.lock index 13552c9..e68e43c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -71,7 +71,7 @@ dependencies = [ [[package]] name = "algohub-server" -version = "0.1.10" +version = "0.1.11" dependencies = [ "anyhow", "chrono", diff --git a/src/models/problem.rs b/src/models/problem.rs index b788b00..21d7379 100644 --- a/src/models/problem.rs +++ b/src/models/problem.rs @@ -53,6 +53,8 @@ pub struct Problem { pub categories: Vec, pub tags: Vec, + pub contest: Option, + pub visibility: ProblemVisibility, pub created_at: chrono::NaiveDateTime, @@ -89,6 +91,8 @@ pub struct CreateProblem<'r> { pub categories: Vec, pub tags: Vec, + pub contest: Option, + pub visibility: ProblemVisibility, } @@ -110,6 +114,7 @@ impl From> for Problem { categories: val.categories, tags: val.tags, visibility: val.visibility, + contest: None, created_at: chrono::Local::now().naive_local(), updated_at: chrono::Local::now().naive_local(), }