changed model fields to pub

struct Invite now insertable
This commit is contained in:
shockrah 2020-02-05 16:31:26 -08:00
parent c5461f16ad
commit 1e1b9d4f72

View File

@ -1,15 +1,16 @@
#[derive(Serialize, Deserialize, Queryable)] use crate::schema::invites;
pub struct InviteView { #[derive(Insertable, Serialize, Deserialize, Queryable)]
pub struct Invite {
pub id: u64, pub id: u64,
expire: u64, pub expires: u64,
uses: Option<i32>, pub uses: Option<i32>,
} }
#[derive(Serialize, Deserialize, Queryable)] #[derive(Serialize, Deserialize, Queryable)]
pub struct UserView { pub struct UserView {
id: i64, pub id: i64,
username: String, pub username: String,
display: Option<String>, pub display: Option<String>,
password: String, pub password: String,
email: Option<String>, pub email: Option<String>,
} }