2020-04-23 03:28:51 +00:00
|
|
|
use super::schema::events;
|
|
|
|
use chrono::{NaiveDateTime};
|
|
|
|
|
|
|
|
#[derive(Queryable)]
|
|
|
|
pub struct Event {
|
|
|
|
pub id: i32,
|
|
|
|
pub event_name: String,
|
|
|
|
pub event_desc: String,
|
|
|
|
pub event_time: NaiveDateTime,
|
|
|
|
pub message_id: String,
|
|
|
|
pub thumbnail_link: String,
|
2020-04-26 01:04:13 +00:00
|
|
|
pub reminder_sent: i32,
|
2020-04-23 03:28:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#[derive(Insertable)]
|
|
|
|
#[table_name="events"]
|
2020-04-24 00:45:02 +00:00
|
|
|
pub struct NewEvent {
|
|
|
|
pub event_name: String,
|
|
|
|
pub event_desc: String,
|
|
|
|
pub event_time: NaiveDateTime,
|
|
|
|
pub message_id: String,
|
|
|
|
pub thumbnail_link: String,
|
2020-04-26 01:04:13 +00:00
|
|
|
pub reminder_sent: i32,
|
2020-04-23 03:28:51 +00:00
|
|
|
}
|