// Generated by Qleany v1.7.0 from entity_dtos.tera

use common::entities::UserInterface;
use common::types::EntityId;
use serde::{Deserialize, Serialize};
use std::convert::From;

#[derive(Debug, Clone, PartialEq, Eq, Default, Serialize, Deserialize)]
pub struct UserInterfaceDto {
    pub id: EntityId,
    pub created_at: chrono::DateTime<chrono::Utc>,
    pub updated_at: chrono::DateTime<chrono::Utc>,
    pub rust_cli: bool,
    pub rust_slint: bool,
    pub cpp_qt_qtwidgets: bool,
    pub cpp_qt_qtquick: bool,
    pub rust_ios: bool,
    pub rust_android: bool,
}

impl From<UserInterfaceDto> for UserInterface {
    fn from(dto: UserInterfaceDto) -> Self {
        UserInterface {
            id: dto.id,
            created_at: dto.created_at,
            updated_at: dto.updated_at,
            rust_cli: dto.rust_cli,
            rust_slint: dto.rust_slint,
            cpp_qt_qtwidgets: dto.cpp_qt_qtwidgets,
            cpp_qt_qtquick: dto.cpp_qt_qtquick,
            rust_ios: dto.rust_ios,
            rust_android: dto.rust_android,
        }
    }
}

impl From<&UserInterfaceDto> for UserInterface {
    fn from(dto: &UserInterfaceDto) -> Self {
        UserInterface {
            id: dto.id,
            created_at: dto.created_at,
            updated_at: dto.updated_at,
            rust_cli: dto.rust_cli,
            rust_slint: dto.rust_slint,
            cpp_qt_qtwidgets: dto.cpp_qt_qtwidgets,
            cpp_qt_qtquick: dto.cpp_qt_qtquick,
            rust_ios: dto.rust_ios,
            rust_android: dto.rust_android,
        }
    }
}

impl From<UserInterface> for UserInterfaceDto {
    fn from(entity: UserInterface) -> Self {
        UserInterfaceDto {
            id: entity.id,
            created_at: entity.created_at,
            updated_at: entity.updated_at,
            rust_cli: entity.rust_cli,
            rust_slint: entity.rust_slint,
            cpp_qt_qtwidgets: entity.cpp_qt_qtwidgets,
            cpp_qt_qtquick: entity.cpp_qt_qtquick,
            rust_ios: entity.rust_ios,
            rust_android: entity.rust_android,
        }
    }
}

#[derive(Debug, Clone, PartialEq, Eq, Default, Serialize, Deserialize)]
pub struct CreateUserInterfaceDto {
    pub created_at: chrono::DateTime<chrono::Utc>,
    pub updated_at: chrono::DateTime<chrono::Utc>,
    pub rust_cli: bool,
    pub rust_slint: bool,
    pub cpp_qt_qtwidgets: bool,
    pub cpp_qt_qtquick: bool,
    pub rust_ios: bool,
    pub rust_android: bool,
}

impl From<CreateUserInterfaceDto> for UserInterface {
    fn from(dto: CreateUserInterfaceDto) -> Self {
        UserInterface {
            id: 0,
            created_at: dto.created_at,
            updated_at: dto.updated_at,
            rust_cli: dto.rust_cli,
            rust_slint: dto.rust_slint,
            cpp_qt_qtwidgets: dto.cpp_qt_qtwidgets,
            cpp_qt_qtquick: dto.cpp_qt_qtquick,
            rust_ios: dto.rust_ios,
            rust_android: dto.rust_android,
        }
    }
}

impl From<&CreateUserInterfaceDto> for UserInterface {
    fn from(dto: &CreateUserInterfaceDto) -> Self {
        UserInterface {
            id: 0,
            created_at: dto.created_at,
            updated_at: dto.updated_at,
            rust_cli: dto.rust_cli,
            rust_slint: dto.rust_slint,
            cpp_qt_qtwidgets: dto.cpp_qt_qtwidgets,
            cpp_qt_qtquick: dto.cpp_qt_qtquick,
            rust_ios: dto.rust_ios,
            rust_android: dto.rust_android,
        }
    }
}

impl From<UserInterface> for CreateUserInterfaceDto {
    fn from(entity: UserInterface) -> Self {
        CreateUserInterfaceDto {
            created_at: entity.created_at,
            updated_at: entity.updated_at,
            rust_cli: entity.rust_cli,
            rust_slint: entity.rust_slint,
            cpp_qt_qtwidgets: entity.cpp_qt_qtwidgets,
            cpp_qt_qtquick: entity.cpp_qt_qtquick,
            rust_ios: entity.rust_ios,
            rust_android: entity.rust_android,
        }
    }
}
#[derive(Debug, Clone, PartialEq, Eq, Default, Serialize, Deserialize)]
pub struct UpdateUserInterfaceDto {
    pub id: EntityId,
    pub created_at: chrono::DateTime<chrono::Utc>,
    pub updated_at: chrono::DateTime<chrono::Utc>,
    pub rust_cli: bool,
    pub rust_slint: bool,
    pub cpp_qt_qtwidgets: bool,
    pub cpp_qt_qtquick: bool,
    pub rust_ios: bool,
    pub rust_android: bool,
}

impl From<UpdateUserInterfaceDto> for UserInterface {
    fn from(dto: UpdateUserInterfaceDto) -> Self {
        UserInterface {
            id: dto.id,
            created_at: dto.created_at,
            updated_at: dto.updated_at,
            rust_cli: dto.rust_cli,
            rust_slint: dto.rust_slint,
            cpp_qt_qtwidgets: dto.cpp_qt_qtwidgets,
            cpp_qt_qtquick: dto.cpp_qt_qtquick,
            rust_ios: dto.rust_ios,
            rust_android: dto.rust_android,
        }
    }
}

impl From<&UpdateUserInterfaceDto> for UserInterface {
    fn from(dto: &UpdateUserInterfaceDto) -> Self {
        UserInterface {
            id: dto.id,
            created_at: dto.created_at,
            updated_at: dto.updated_at,
            rust_cli: dto.rust_cli,
            rust_slint: dto.rust_slint,
            cpp_qt_qtwidgets: dto.cpp_qt_qtwidgets,
            cpp_qt_qtquick: dto.cpp_qt_qtquick,
            rust_ios: dto.rust_ios,
            rust_android: dto.rust_android,
        }
    }
}

impl From<UserInterface> for UpdateUserInterfaceDto {
    fn from(entity: UserInterface) -> Self {
        UpdateUserInterfaceDto {
            id: entity.id,
            created_at: entity.created_at,
            updated_at: entity.updated_at,
            rust_cli: entity.rust_cli,
            rust_slint: entity.rust_slint,
            cpp_qt_qtwidgets: entity.cpp_qt_qtwidgets,
            cpp_qt_qtquick: entity.cpp_qt_qtquick,
            rust_ios: entity.rust_ios,
            rust_android: entity.rust_android,
        }
    }
}

impl From<UserInterfaceDto> for UpdateUserInterfaceDto {
    fn from(dto: UserInterfaceDto) -> Self {
        UpdateUserInterfaceDto {
            id: dto.id,
            created_at: dto.created_at,
            updated_at: dto.updated_at,
            rust_cli: dto.rust_cli,
            rust_slint: dto.rust_slint,
            cpp_qt_qtwidgets: dto.cpp_qt_qtwidgets,
            cpp_qt_qtquick: dto.cpp_qt_qtquick,
            rust_ios: dto.rust_ios,
            rust_android: dto.rust_android,
        }
    }
}
