25 lines
505 B
Rust
25 lines
505 B
Rust
use chrono::NaiveDateTime;
|
|
use super::schema::calendars;
|
|
|
|
#[derive(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(Insertable)]
|
|
#[table_name = "calendars"]
|
|
pub struct NewCalendar {
|
|
pub id: String,
|
|
pub url: String,
|
|
|
|
pub last_fetch: Option<NaiveDateTime>,
|
|
}
|