2020-05-24 14:35:54 +00:00
|
|
|
///! User information
|
|
|
|
///!
|
|
|
|
///! @author Pierre Hubert
|
|
|
|
|
|
|
|
pub type UserID = i64;
|
|
|
|
|
2020-05-26 11:15:39 +00:00
|
|
|
#[derive(Debug, PartialEq)]
|
|
|
|
pub enum UserPageStatus {
|
|
|
|
OPEN,
|
|
|
|
PUBLIC,
|
|
|
|
PRIVATE
|
|
|
|
}
|
|
|
|
|
2020-05-26 11:53:24 +00:00
|
|
|
#[derive(Debug, PartialEq)]
|
|
|
|
#[allow(non_camel_case_types)]
|
|
|
|
pub enum AccountImageVisibility {
|
|
|
|
FRIENDS,
|
|
|
|
COMUNIC_USERS,
|
|
|
|
EVERYONE
|
|
|
|
}
|
|
|
|
|
2020-05-23 17:17:48 +00:00
|
|
|
#[derive(Debug)]
|
|
|
|
pub struct User {
|
2020-05-24 14:35:54 +00:00
|
|
|
pub id: UserID,
|
2020-05-23 17:17:48 +00:00
|
|
|
pub email: String,
|
|
|
|
pub password: String,
|
|
|
|
pub first_name: String,
|
|
|
|
pub last_name: String,
|
2020-05-26 11:18:38 +00:00
|
|
|
pub status: UserPageStatus,
|
|
|
|
pub virtual_directory: Option<String>,
|
2020-05-26 11:53:24 +00:00
|
|
|
pub account_image_path: Option<String>,
|
|
|
|
pub account_image_visibility: AccountImageVisibility,
|
2020-05-23 17:17:48 +00:00
|
|
|
}
|