From 653521c50eb530631219f6615bfba60a3e2a2d62 Mon Sep 17 00:00:00 2001 From: phoenix Date: Fri, 29 May 2026 09:45:48 -0400 Subject: [PATCH 1/2] Added user module --- src/lib.rs | 1 + src/user/mod.rs | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 src/user/mod.rs diff --git a/src/lib.rs b/src/lib.rs index c0b7c6d..92c5792 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,3 +1,4 @@ pub mod config; pub mod contact; pub mod token; +pub mod user; diff --git a/src/user/mod.rs b/src/user/mod.rs new file mode 100644 index 0000000..0179e7e --- /dev/null +++ b/src/user/mod.rs @@ -0,0 +1,18 @@ +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +pub struct User { + pub id: uuid::Uuid, + pub phone_number: String, + pub username: String, + pub password: String, + // Firstname is a pointer + pub firstname: String, + // Lastname is a pointer + pub lastname: String, + #[serde(with = "time::serde::rfc3339::option")] + pub created: Option, + #[serde(with = "time::serde::rfc3339::option")] + pub last_login: Option, +} + -- 2.47.3 From 6d8c9b925210e8919c97310a191176f69b07b8ec Mon Sep 17 00:00:00 2001 From: phoenix Date: Fri, 29 May 2026 09:47:50 -0400 Subject: [PATCH 2/2] cargo fmt --- src/user/mod.rs | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/user/mod.rs b/src/user/mod.rs index 0179e7e..5de18e2 100644 --- a/src/user/mod.rs +++ b/src/user/mod.rs @@ -2,17 +2,16 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct User { - pub id: uuid::Uuid, - pub phone_number: String, - pub username: String, - pub password: String, - // Firstname is a pointer - pub firstname: String, - // Lastname is a pointer - pub lastname: String, + pub id: uuid::Uuid, + pub phone_number: String, + pub username: String, + pub password: String, + // Firstname is a pointer + pub firstname: String, + // Lastname is a pointer + pub lastname: String, #[serde(with = "time::serde::rfc3339::option")] - pub created: Option, + pub created: Option, #[serde(with = "time::serde::rfc3339::option")] - pub last_login: Option, + pub last_login: Option, } - -- 2.47.3