From 179a5500348c016a358e9ced7b661502c6b00b92 Mon Sep 17 00:00:00 2001 From: phoenix Date: Fri, 29 May 2026 21:41:40 -0400 Subject: [PATCH] Adding Login history (#9) Reviewed-on: http://git.kundeng.us/phoenix/textsender-models/pulls/9 --- src/user/mod.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/user/mod.rs b/src/user/mod.rs index 8d8c934..ffe509d 100644 --- a/src/user/mod.rs +++ b/src/user/mod.rs @@ -27,3 +27,19 @@ pub struct ServiceUser { #[serde(with = "time::serde::rfc3339::option")] pub last_login: Option, } + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct UserLoginHistory { + pub id: uuid::Uuid, + #[serde(with = "time::serde::rfc3339::option")] + pub login_time: Option, + pub user_id: uuid::Uuid, +} + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct ServiceUserLoginHistory { + pub id: uuid::Uuid, + #[serde(with = "time::serde::rfc3339::option")] + pub login_time: Option, + pub service_user_id: uuid::Uuid, +}