Compare commits

..
Author SHA1 Message Date
phoenix 21074103a6 cargo fmt
Release Tagging / release (pull_request) Successful in 29s
Rust Build / Check (pull_request) Successful in 49s
Rust Build / Rustfmt (pull_request) Successful in 35s
Rust Build / Test Suite (pull_request) Successful in 57s
Rust Build / build (pull_request) Successful in 38s
Rust Build / Clippy (pull_request) Successful in 44s
2026-05-29 21:38:49 -04:00
phoenix ae41183542 Added Login history 2026-05-29 21:38:23 -04:00
phoenix a8e173d831 ServiceUser (#8)
Release Tagging / release (push) Successful in 29s
Rust Build / Check (push) Successful in 39s
Rust Build / Test Suite (push) Successful in 25s
Rust Build / Rustfmt (push) Successful in 27s
Rust Build / Clippy (push) Successful in 28s
Rust Build / build (push) Successful in 26s
Reviewed-on: phoenix/textsender-models#8
2026-05-29 10:02:51 -04:00
+17 -1
View File
@@ -19,11 +19,27 @@ pub struct User {
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct ServiceUser {
pub id: uuid::Uuid,
// TODO: Remove the omitempty tags at a later point
pub username: String,
pub passphrase: String,
#[serde(with = "time::serde::rfc3339::option")]
pub created: Option<time::OffsetDateTime>,
// When serializing to json, if empty do not populate
#[serde(with = "time::serde::rfc3339::option")]
pub last_login: Option<time::OffsetDateTime>,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UserLoginHistory {
pub id: uuid::Uuid,
#[serde(with = "time::serde::rfc3339::option")]
pub login_time: Option<time::OffsetDateTime>,
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<time::OffsetDateTime>,
pub service_user_id: uuid::Uuid,
}