use crate::models::common::{EventType, SubscriptionLevel, TargetType}; use chrono::{DateTime, Utc}; use serde::{Deserialize, Serialize}; use uuid::Uuid; #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, sqlx::FromRow, utoipa::ToSchema)] pub struct NotificationSubscription { pub id: Uuid, pub user_id: Uuid, pub workspace_id: Option, pub repo_id: Option, pub target_type: TargetType, pub target_id: Option, pub event_types: Vec, pub channels: Vec, pub level: SubscriptionLevel, pub muted: bool, pub muted_until: Option>, pub created_at: DateTime, pub updated_at: DateTime, }