summaryrefslogtreecommitdiff
path: root/src/database/problem.rs
blob: fdbb2b5094da07e602ff7690cb1556440ef87e7b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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 }
}