use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct InboxNotification {
#[serde(rename = "body")]
pub body: String,
#[serde(rename = "channel_type")]
pub channel_type: String,
#[serde(rename = "created_at")]
pub created_at: String,
#[serde(rename = "data")]
pub data: serde_json::Value,
#[serde(rename = "id")]
pub id: String,
#[serde(rename = "is_archived")]
pub is_archived: bool,
#[serde(rename = "is_read")]
pub is_read: bool,
#[serde(rename = "is_seen")]
pub is_seen: bool,
#[serde(rename = "read_at", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub read_at: Option<Option<String>>,
#[serde(rename = "seen_at", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub seen_at: Option<Option<String>>,
#[serde(rename = "subject", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub subject: Option<Option<String>>,
}
impl InboxNotification {
pub fn new(body: String, channel_type: String, created_at: String, data: serde_json::Value, id: String, is_archived: bool, is_read: bool, is_seen: bool) -> InboxNotification {
InboxNotification {
body,
channel_type,
created_at,
data,
id,
is_archived,
is_read,
is_seen,
read_at: None,
seen_at: None,
subject: None,
}
}
}