Add CalendarEvent, AttendeeInfo, ImportedEvent types for calendar import (T6.1)

This commit is contained in:
iamdoubz
2026-07-01 15:07:36 -05:00
parent 1112b38501
commit cd170c2907
+22
View File
@@ -135,6 +135,28 @@ pub struct CalendarEvent {
pub organizer: Option<String>,
pub starts_at: Option<i64>,
pub ends_at: Option<i64>,
pub description: Option<String>,
/// The source's own stable id (e.g. an iCalendar UID) — used to dedup
/// re-imports of the same event rather than creating duplicate rows.
pub raw_uid: Option<String>,
}
/// A parsed attendee before persistence — no DB row/id exists until storage
/// upserts it (T6.1/T6.2, FR-CAL-1).
#[derive(Debug, Clone)]
pub struct AttendeeInfo {
pub name: String,
pub email: Option<String>,
pub role: Option<String>, // organizer|required|optional
}
/// An imported event with the attendees pulled from the same source record —
/// PST/ICS both list attendees inline per-appointment, so there's no
/// separate "fetch attendees for event X" round trip against the source.
#[derive(Debug, Clone)]
pub struct ImportedEvent {
pub event: CalendarEvent,
pub attendees: Vec<AttendeeInfo>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]