summaryrefslogtreecommitdiff
path: root/dichroism/src/models/photo.rs
blob: e24a691cd423e1cc0aa27cb117125e462a69187c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#[derive(Debug, Clone)]
pub struct Photo {
    pub id: String,
}

impl Photo {
    pub fn new(id: String) -> Self {
        Self { id }
    }

    pub fn filename(&self) -> String {
        format!("{}.jpg", self.id)
    }
}