summaryrefslogtreecommitdiff
path: root/src/database/problem.rs
blob: c3e04c2c5f69daf953594d235ba55daed9ff5e91 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
pub struct Problem {
    id: i64,
    title: String,
    description: String,
}

impl Problem {
    pub(super) fn new(id: i64, title: String, description: String) -> Self {
        Self { id, title, description }
    }

    pub fn id(&self) -> i64 { self.id }
    pub fn title(&self) -> &str { &self.title }
    pub fn description(&self) -> &str { &self.description }
}