Added Organization

This commit is contained in:
2026-05-29 22:47:46 -04:00
parent d907bf99a2
commit 38bf53e05e
+13
View File
@@ -28,6 +28,15 @@ pub struct ServiceUser {
pub last_login: Option<time::OffsetDateTime>,
}
#[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<time::OffsetDateTime>,
}
#[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<time::OffsetDateTime>,
#[serde(with = "time::serde::rfc3339::option")]
pub last_login: Option<time::OffsetDateTime>,
}
@@ -67,6 +79,7 @@ pub fn init_user_profile(usr: &User) -> UserProfile {
}
}
#[cfg(test)]
mod tests {
#[test]