1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
//! Contains the implementation of [`ApplicationSettingDto`].

use crate::model::entity::ApplicationSetting;

use super::ApplicationSettingDto;

impl From<ApplicationSetting> for ApplicationSettingDto {
    fn from(setting: ApplicationSetting) -> Self {
        Self {
            id: setting.id,
            key: setting.key,
            value: setting.value,
        }
    }
}

impl<T> From<(T, ApplicationSetting)> for ApplicationSettingDto {
    fn from((_, setting): (T, ApplicationSetting)) -> Self {
        Self::from(setting)
    }
}