postmasterlib/dto/
header_dto.rsuse serde::{Deserialize, Serialize};
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct HeaderDto {
pub header_title: String,
pub header_image: String,
pub background: String,
}
impl HeaderDto {
pub fn new(title: String, image: Option<String>, background: Option<String>) -> HeaderDto {
HeaderDto {
header_title: title,
header_image: image.unwrap_or("https://webschool.au/logo192.png".to_string()),background: background.unwrap_or("linear-gradient(90deg, #1B0084, #00519b)".to_string()),
}
}
}