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..5de18e2 --- /dev/null +++ b/src/user/mod.rs @@ -0,0 +1,17 @@ +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, +}