lila-chat/src/user.rs

19 lines
381 B
Rust
Raw Normal View History

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