| 1 |
|
| 2 |
|
| 3 |
use chrono::{DateTime, Utc}; |
| 4 |
use serde::{Deserialize, Serialize}; |
| 5 |
use crate::id_types::{SyncAccountId, UserId}; |
| 6 |
|
| 7 |
|
| 8 |
#[derive(Debug, Clone, Serialize, Deserialize)] |
| 9 |
#[serde(rename_all = "camelCase")] |
| 10 |
pub struct SyncAccount { |
| 11 |
pub id: SyncAccountId, |
| 12 |
#[serde(skip_serializing)] |
| 13 |
pub user_id: UserId, |
| 14 |
pub provider: String, |
| 15 |
pub account_name: String, |
| 16 |
pub email: Option<String>, |
| 17 |
pub sync_calendars: bool, |
| 18 |
pub sync_contacts: bool, |
| 19 |
pub calendar_ids: Vec<String>, |
| 20 |
pub last_calendar_sync: Option<DateTime<Utc>>, |
| 21 |
pub last_contact_sync: Option<DateTime<Utc>>, |
| 22 |
pub sync_interval_minutes: i32, |
| 23 |
pub enabled: bool, |
| 24 |
pub created_at: DateTime<Utc>, |
| 25 |
} |
| 26 |
|