brewlog/src/domain/auth/users.rs
Jon Seager edc0021792
refactor: split large directories into coffee/auth/analytics subdirs
- Restructure domain/, repositories/, and routes/api/ into themed
  subdirectories: coffee/, auth/, analytics/ (and system/ for routes)
- Convert super:: relative imports to crate:: absolute paths
- Promote macro visibility from pub(super) to pub(crate)
- Add pub use re-exports for backward-compatible import paths
2026-02-08 18:16:16 +00:00

35 lines
702 B
Rust

use chrono::{DateTime, Utc};
use serde::{Deserialize, Serialize};
use crate::domain::ids::UserId;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct User {
pub id: UserId,
pub username: String,
pub uuid: String,
pub created_at: DateTime<Utc>,
}
#[derive(Debug, Clone)]
pub struct NewUser {
pub username: String,
pub uuid: String,
}
impl User {
pub fn new(id: UserId, username: String, uuid: String, created_at: DateTime<Utc>) -> Self {
Self {
id,
username,
uuid,
created_at,
}
}
}
impl NewUser {
pub fn new(username: String, uuid: String) -> Self {
Self { username, uuid }
}
}