summaryrefslogblamecommitdiff
path: root/dichroism/src/repo/entities/photo_set.rs
blob: 6e48e12874e69f470360d7615011f4f4ed1c5be4 (plain) (tree)





















                                                          
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),
        }
    }
}