From a005add5513182abb0b1230cf514c7a45b290e4b Mon Sep 17 00:00:00 2001 From: Daniel Hader Date: Sun, 10 May 2026 10:15:56 -0500 Subject: database with problem model --- src/database/problem.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/database/problem.rs (limited to 'src/database/problem.rs') diff --git a/src/database/problem.rs b/src/database/problem.rs new file mode 100644 index 0000000..fdbb2b5 --- /dev/null +++ b/src/database/problem.rs @@ -0,0 +1,16 @@ +pub struct Problem { + id: i64, + title: String, + description: String, +} + +impl Problem { + pub fn new(id: i64, title: String, description: String) -> Self { + Self { id, title, description } + } + + pub fn title(&self) -> &str { &self.title } + pub fn description(&self) -> &str { &self.description } +} + + -- cgit v1.2.3