new models for users table interface

This commit is contained in:
shockrah 2020-03-07 22:05:46 -08:00
parent 54f5b1bbe1
commit 316c409796

View File

@ -7,17 +7,11 @@ pub struct Invite {
pub uses: Option<i32>, pub uses: Option<i32>,
} }
#[derive(Serialize, Deserialize, Queryable)] #[derive(Serialize, Deserialize, Queryable, Debug]
pub struct UserView { #[table_name = "users"]
pub id: i64, pub struct User {
pub username: String, userid: u64,
pub display: Option<String>, username: String,
pub password: String, key_hash: Option<String>,
pub email: Option<String>, date: u64,
}
#[derive(Serialize, Deserialize, Queryable, Insertable)]
pub struct NewUser {
pub token: String,
pub invite_id: u64
} }