Initial commit

Basic POST and GET callback have been implemented
This commit is contained in:
2019-03-03 14:05:50 +01:00
commit d3bac73679
16 changed files with 2317 additions and 0 deletions

16
src/models.rs Normal file
View File

@@ -0,0 +1,16 @@
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>,
}