summaryrefslogtreecommitdiff
path: root/src/database/submission.rs
diff options
context:
space:
mode:
authorDaniel Hader <[email protected]>2026-06-02 20:37:40 -0500
committerDaniel Hader <[email protected]>2026-06-02 20:37:40 -0500
commit51fac3f3b6f73b649ba8109b37d8ff311b905cd4 (patch)
tree4a2eb771842bf65ccb6e95c6c1d59ef65cbd2a7d /src/database/submission.rs
parent14a4d586b7c7abc86674724153757f15faf7262c (diff)
problem statement on submission page and submission logic tweaks
Diffstat (limited to 'src/database/submission.rs')
-rw-r--r--src/database/submission.rs15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/database/submission.rs b/src/database/submission.rs
index 2ec1287..4a83edd 100644
--- a/src/database/submission.rs
+++ b/src/database/submission.rs
@@ -5,9 +5,9 @@ pub struct Submission {
id: i64,
user_id: i64,
problem_id: i64,
- code: String,
language: String,
- validated: bool,
+ details: String,
+ code: String,
}
impl Submission {
@@ -15,17 +15,18 @@ impl Submission {
id: i64,
user_id: i64,
problem_id: i64,
- code: String,
language: String,
- validated: bool,
+ details: String,
+ code: String,
) -> Self {
- Self { id, user_id, problem_id, code, language, validated }
+ Self { id, user_id, problem_id, language, details, code }
}
pub fn id(&self) -> i64 { self.id }
pub fn user_id(&self) -> i64 { self.user_id }
pub fn problem_id(&self) -> i64 { self.problem_id }
- pub fn code(&self) -> &str { &self.code }
pub fn language(&self) -> &str { &self.language }
- pub fn validated(&self) -> bool { self.validated }
+ pub fn details(&self) -> &str { &self.details }
+ pub fn code(&self) -> &str { &self.code }
+
}