use crate::authentication::Role; use chrono::{DateTime, Utc}; use uuid::Uuid; pub struct UserEntry { pub user_id: Uuid, pub username: String, pub role: Role, pub full_name: Option, pub bio: Option, pub member_since: DateTime, } impl UserEntry { pub fn formatted_date(&self) -> String { self.member_since.format("%B %d, %Y").to_string() } pub fn is_admin(&self) -> bool { matches!(self.role, Role::Admin) } }