new field for online status of users
new short structure describing online users
This commit is contained in:
parent
a3af490dc9
commit
f343f6d252
@ -8,5 +8,6 @@ CREATE TABLE IF NOT EXISTS `users` (
|
||||
`username` varchar(255) NOT NULL,
|
||||
`key` varchar(255) NOT NULL,
|
||||
`date` bigint UNSIGNED NOT NULL,
|
||||
`status` int NOT NULL,
|
||||
PRIMARY KEY( `userid` )
|
||||
);
|
@ -14,8 +14,14 @@ pub struct User {
|
||||
pub username: String,
|
||||
pub key: String,
|
||||
pub date: u64,
|
||||
pub status: i32,
|
||||
}
|
||||
|
||||
pub const USER_OFFLINE: i32 = 1;
|
||||
pub const USER_ONLINE: i32 = 2;
|
||||
pub const USER_AWAY: i32 = 3;
|
||||
pub const USER_DO_NOT_DISTRUB: i32 = 4;
|
||||
|
||||
// These are to be use specifically for discerning between channel types
|
||||
pub const VOICE_CHANNEL: i32 = 1;
|
||||
pub const TEXT_CHANNEL: i32 = 2;
|
||||
|
@ -15,6 +15,7 @@ pub struct NewUserResponse {
|
||||
}
|
||||
|
||||
// This is basically anyone that's online at the moment
|
||||
#[derive(Serialize, Debug)]
|
||||
pub struct OnlineUser {
|
||||
pub id: u64,
|
||||
pub username: String,
|
||||
|
@ -23,6 +23,7 @@ table! {
|
||||
username -> Varchar,
|
||||
key -> Varchar,
|
||||
date -> Unsigned<Bigint>,
|
||||
status -> Integer,
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user