use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Deserialize, Serialize)]
#[repr(transparent)]
pub struct UserId(pub i32);
#[derive(Debug, Clone, Deserialize)]
pub struct User {
pub id: UserId,
pub username: String,
pub email: String,
pub first_name: String,
pub last_name: String,
pub is_superuser: bool,
pub is_staff: bool,
pub is_active: bool,
}
impl std::fmt::Display for UserId {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{}", self.0)
}
}