mirror of
https://github.com/lennart-k/rustical.git
synced 2026-01-31 06:38:22 +00:00
Move ical-related stuff to rustical_ical crate
This commit is contained in:
27
crates/store/src/calendar.rs
Normal file
27
crates/store/src/calendar.rs
Normal file
@@ -0,0 +1,27 @@
|
||||
use crate::synctoken::format_synctoken;
|
||||
use chrono::NaiveDateTime;
|
||||
use rustical_ical::CalendarObjectType;
|
||||
use serde::Serialize;
|
||||
|
||||
#[derive(Debug, Default, Clone, Serialize)]
|
||||
pub struct Calendar {
|
||||
pub principal: String,
|
||||
pub id: String,
|
||||
pub displayname: Option<String>,
|
||||
pub order: i64,
|
||||
pub description: Option<String>,
|
||||
pub color: Option<String>,
|
||||
pub timezone: Option<String>,
|
||||
pub timezone_id: Option<String>,
|
||||
pub deleted_at: Option<NaiveDateTime>,
|
||||
pub synctoken: i64,
|
||||
pub subscription_url: Option<String>,
|
||||
pub push_topic: String,
|
||||
pub components: Vec<CalendarObjectType>,
|
||||
}
|
||||
|
||||
impl Calendar {
|
||||
pub fn format_synctoken(&self) -> String {
|
||||
format_synctoken(self.synctoken)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user