new user structs for interacting with end users/db
This commit is contained in:
parent
1cab9b8bb8
commit
83aafa9ff5
@ -7,12 +7,21 @@ pub struct Invite {
|
|||||||
pub uses: i32,
|
pub uses: i32,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Serialize, Deserialize, Queryable, Insertable, Debug)]
|
#[derive(Serialize, Deserialize, Queryable, Debug)]
|
||||||
#[table_name = "users"]
|
#[table_name = "users"]
|
||||||
pub struct User {
|
pub struct User {
|
||||||
pub userid: u64,
|
pub userid: u64,
|
||||||
pub username: String,
|
pub username: String,
|
||||||
pub key: String,
|
pub secret: String,
|
||||||
|
pub date: u64,
|
||||||
|
pub status: i32,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Insertable)
|
||||||
|
#[table_name = "users"]
|
||||||
|
pub struct InsertableUser {
|
||||||
|
pub name: String,
|
||||||
|
pub secret: String,
|
||||||
pub date: u64,
|
pub date: u64,
|
||||||
pub status: i32,
|
pub status: i32,
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user