Web-based Calendar Aggregator https://ticker.c3d2.de/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
823 B

use chrono::NaiveDateTime;
use super::schema::{calendars, events};
#[derive(Debug, Queryable)]
pub struct Calendar {
pub id: String,
pub url: String,
pub last_fetch: Option<NaiveDateTime>,
pub last_success: Option<NaiveDateTime>,
pub error_message: Option<String>,
pub etag: Option<String>,
pub last_modified: Option<String>,
}
#[derive(Debug, Insertable)]
#[table_name = "calendars"]
pub struct NewCalendar {
pub id: String,
pub url: String,
pub last_fetch: Option<NaiveDateTime>,
}
#[derive(Debug, Queryable, Insertable)]
pub struct Event {
pub calendar: String,
pub id: String,
pub dtstart: NaiveDateTime,
pub dtend: Option<NaiveDateTime>,
pub summary: String,
pub location: Option<String>,
pub url: Option<String>,
12 months ago
pub recurrence: bool,
}