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,
|
||||
}
|
||||
|
||||
#[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
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user