25 lines
810 B
Rust
25 lines
810 B
Rust
use crate::models::common::{DeliveryChannel, Provider, Status};
|
|
use chrono::{DateTime, Utc};
|
|
use serde::{Deserialize, Serialize};
|
|
use uuid::Uuid;
|
|
|
|
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, sqlx::FromRow)]
|
|
pub struct NotificationDelivery {
|
|
pub id: Uuid,
|
|
pub notification_id: Uuid,
|
|
pub user_id: Uuid,
|
|
pub channel: DeliveryChannel,
|
|
pub destination: Option<String>,
|
|
pub status: Status,
|
|
pub provider: Option<Provider>,
|
|
pub provider_message_id: Option<String>,
|
|
pub attempts: i32,
|
|
pub last_error: Option<String>,
|
|
pub scheduled_at: Option<DateTime<Utc>>,
|
|
pub sent_at: Option<DateTime<Utc>>,
|
|
pub delivered_at: Option<DateTime<Utc>>,
|
|
pub failed_at: Option<DateTime<Utc>>,
|
|
pub created_at: DateTime<Utc>,
|
|
pub updated_at: DateTime<Utc>,
|
|
}
|