new user structs for interacting with end users/db

This commit is contained in:
shockrah 2020-04-26 18:08:01 -07:00
parent 1cab9b8bb8
commit 83aafa9ff5

View File

@ -7,12 +7,21 @@ pub struct Invite {
pub uses: i32,
}
#[derive(Serialize, Deserialize, Queryable, Insertable, Debug)]
#[derive(Serialize, Deserialize, Queryable, Debug)]
#[table_name = "users"]
pub struct User {
pub userid: u64,
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 status: i32,
}
@ -43,4 +52,4 @@ pub struct InsertableChannel {
pub permissions: i32,
pub limit: i32, // <= 0 means there is no limit
pub type_: i32, // 1 for voice 2 for text
}
}