//! Sync account model for external calendar/contact provider connections. use chrono::{DateTime, Utc}; use serde::{Deserialize, Serialize}; use crate::id_types::{SyncAccountId, UserId}; /// A configured sync account for an external provider (Google, Apple, Microsoft). #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SyncAccount { pub id: SyncAccountId, #[serde(skip_serializing)] pub user_id: UserId, pub provider: String, pub account_name: String, pub email: Option, pub sync_calendars: bool, pub sync_contacts: bool, pub calendar_ids: Vec, pub last_calendar_sync: Option>, pub last_contact_sync: Option>, pub sync_interval_minutes: i32, pub enabled: bool, pub created_at: DateTime, }