1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
use serde::{Deserialize, Serialize}; use uuid::Uuid; #[derive(Clone, Debug, Deserialize, Serialize)] pub enum MemberRole { Creator, Admin, Participant, Observer, Invited } #[derive(Clone, Debug, Deserialize, Serialize)] pub struct Member { user_id: Uuid, name: String, role: MemberRole } impl Member { pub fn user_id(&self) -> &Uuid { &self.user_id } pub fn name(&self) -> &String { &self.name } pub fn role(&self) -> &MemberRole { &self.role } }