From 38bf53e05ec6df5be587802d9ea74abd83654aed Mon Sep 17 00:00:00 2001 From: phoenix Date: Fri, 29 May 2026 22:47:46 -0400 Subject: [PATCH] Added Organization --- src/user/mod.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/user/mod.rs b/src/user/mod.rs index fa9d435..ba0d30a 100644 --- a/src/user/mod.rs +++ b/src/user/mod.rs @@ -28,6 +28,15 @@ pub struct ServiceUser { pub last_login: Option, } +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct Organization { + pub id: uuid::Uuid, + pub name: String, + #[serde(with = "time::serde::rfc3339::option")] + pub created: Option, +} + + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UserLoginHistory { pub id: uuid::Uuid, @@ -44,6 +53,7 @@ pub struct ServiceUserLoginHistory { pub service_user_id: uuid::Uuid, } + #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct UserProfile { pub user_id: uuid::Uuid, @@ -51,7 +61,9 @@ pub struct UserProfile { pub username: String, pub firstname: String, pub lastname: String, + #[serde(with = "time::serde::rfc3339::option")] pub created: Option, + #[serde(with = "time::serde::rfc3339::option")] pub last_login: Option, } @@ -67,6 +79,7 @@ pub fn init_user_profile(usr: &User) -> UserProfile { } } + #[cfg(test)] mod tests { #[test]