Add a model for external apps

Stores their name, website, and credentials
This commit is contained in:
Baptiste Gelez
2018-10-21 14:19:07 +01:00
parent 76ca76f068
commit 4c8a727e9e
7 changed files with 56 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
use chrono::NaiveDateTime;
use schema::apps;
pub struct App {
pub id: i32,
pub name: String,
pub client_id: String,
pub client_secret: String,
pub redirect_uri: Option<String>,
pub website: Option<String>,
pub creation_date: NaiveDateTime,
}
impl App {
get!(apps, App);
insert!(apps, NewApp);
}