2021-07-17 18:45:52 +00:00
|
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
|
2021-07-22 21:17:55 +00:00
|
|
|
#[derive(Clone, Serialize, Deserialize, Debug)]
|
|
|
|
pub enum UserType {
|
|
|
|
Normal,
|
|
|
|
Moderator,
|
|
|
|
Admin,
|
|
|
|
}
|
|
|
|
|
2021-07-17 18:45:52 +00:00
|
|
|
// Struct to store basic user data
|
2021-07-18 02:27:05 +00:00
|
|
|
#[derive(Clone, Serialize, Deserialize, Debug)]
|
2021-07-17 18:45:52 +00:00
|
|
|
pub struct User {
|
|
|
|
pub name: String,
|
|
|
|
pub pin_hashed: String,
|
2021-07-17 19:52:30 +00:00
|
|
|
pub pronouns: String,
|
2021-07-18 00:32:57 +00:00
|
|
|
pub session_token: String,
|
2021-07-22 21:17:55 +00:00
|
|
|
pub role: UserType,
|
2021-07-17 18:45:52 +00:00
|
|
|
}
|