summaryrefslogtreecommitdiff
path: root/dichroism/src/repo/entities/photo_set.rs
blob: 6e48e12874e69f470360d7615011f4f4ed1c5be4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
use crate::models;

#[derive(Debug, Clone, Queryable)]
pub struct PhotoSet {
    pub id: i32,
    pub original: String,
    pub fullsize: String,
    pub base: String,
    pub thumbnail: String,
}

impl Into<models::PhotoSet> for PhotoSet {
    fn into(self) -> models::PhotoSet {
        models::PhotoSet {
            id: Some(self.id),
            original: models::Photo::new(self.original),
            fullsize: models::Photo::new(self.fullsize),
            base: models::Photo::new(self.base),
            thumbnail: models::Photo::new(self.thumbnail),
        }
    }
}