Organization #11

Merged
phoenix merged 3 commits from organization into v0.3.0-migrate 2026-05-29 22:55:32 -04:00
Showing only changes of commit 38bf53e05e - Show all commits
+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]