23 lines
724 B
Rust
23 lines
724 B
Rust
use crate::models::common::Status;
|
|
use chrono::{DateTime, Utc};
|
|
use serde::{Deserialize, Serialize};
|
|
use uuid::Uuid;
|
|
|
|
/// Tracks a single cross-post delivery when an article is published
|
|
/// to a follower channel/workspace.
|
|
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, sqlx::FromRow)]
|
|
pub struct ArticleCrossPost {
|
|
pub id: Uuid,
|
|
pub article_id: Uuid,
|
|
pub follow_id: Uuid,
|
|
pub target_workspace_id: Uuid,
|
|
pub target_channel_id: Option<Uuid>,
|
|
pub status: Status,
|
|
pub attempts: i32,
|
|
pub last_error: Option<String>,
|
|
pub sent_at: Option<DateTime<Utc>>,
|
|
pub delivered_at: Option<DateTime<Utc>>,
|
|
pub failed_at: Option<DateTime<Utc>>,
|
|
pub created_at: DateTime<Utc>,
|
|
}
|