new models for users table interface
This commit is contained in:
parent
54f5b1bbe1
commit
316c409796
@ -7,17 +7,11 @@ pub struct Invite {
|
||||
pub uses: Option<i32>,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Queryable)]
|
||||
pub struct UserView {
|
||||
pub id: i64,
|
||||
pub username: String,
|
||||
pub display: Option<String>,
|
||||
pub password: String,
|
||||
pub email: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Queryable, Insertable)]
|
||||
pub struct NewUser {
|
||||
pub token: String,
|
||||
pub invite_id: u64
|
||||
#[derive(Serialize, Deserialize, Queryable, Debug]
|
||||
#[table_name = "users"]
|
||||
pub struct User {
|
||||
userid: u64,
|
||||
username: String,
|
||||
key_hash: Option<String>,
|
||||
date: u64,
|
||||
}
|
Loading…
Reference in New Issue
Block a user