Files
callmeback/src/models.rs
David Rousselie d3bac73679 Initial commit
Basic POST and GET callback have been implemented
2019-03-03 23:48:26 +01:00

17 lines
323 B
Rust

use super::schema::callbacks;
use chrono::prelude::*;
#[derive(Queryable, Serialize)]
pub struct Callback {
id: i32,
url: String,
scheduled_date: DateTime<Utc>,
}
#[derive(Insertable)]
#[table_name = "callbacks"]
pub struct NewCallback<'a> {
pub url: &'a str,
pub scheduled_date: &'a DateTime<Utc>,
}