Compare commits

...

2 Commits

Author SHA1 Message Date
e9d73c391e user_change_again (#29)
All checks were successful
Release Tagging / release (push) Successful in 36s
Rust Build / Check (pull_request) Successful in 29s
Rust Build / Test Suite (pull_request) Successful in 31s
Rust Build / Rustfmt (pull_request) Successful in 31s
Rust Build / Clippy (pull_request) Successful in 28s
Rust Build / build (pull_request) Successful in 28s
Rust Build / Check (push) Successful in 32s
Rust Build / Test Suite (push) Successful in 31s
Rust Build / Rustfmt (push) Successful in 28s
Rust Build / Clippy (push) Successful in 30s
Rust Build / build (push) Successful in 33s
Reviewed-on: #29
Co-authored-by: phoenix <kundeng94@gmail.com>
Co-committed-by: phoenix <kundeng94@gmail.com>
2025-04-05 16:58:52 +00:00
d476b128cb user_change (#28)
All checks were successful
Rust Build / Check (push) Successful in 34s
Rust Build / Test Suite (push) Successful in 30s
Rust Build / Rustfmt (push) Successful in 27s
Rust Build / Clippy (push) Successful in 28s
Rust Build / build (push) Successful in 31s
Release Tagging / release (push) Successful in 31s
Reviewed-on: #28
Co-authored-by: phoenix <kundeng94@gmail.com>
Co-committed-by: phoenix <kundeng94@gmail.com>
2025-04-05 16:25:57 +00:00
2 changed files with 7 additions and 6 deletions

View File

@@ -9,6 +9,7 @@ license = "MIT"
serde = { version = "1.0.218", features = ["derive"] }
serde_json = { version = "1.0.139" }
rand = { version = "0.9" }
time = { version = "0.3.41", features = ["formatting", "macros", "parsing", "serde"] }
uuid = { version = "1.16.0", features = ["v4", "serde"] }
[dev-dependencies]
tempfile = { version = "3.19.1" }

View File

@@ -21,12 +21,12 @@ pub struct User {
#[serde(skip_serializing_if = "String::is_empty")]
pub lastname: String,
pub email_verified: bool,
#[serde(skip_serializing_if = "String::is_empty")]
pub date_created: String,
#[serde(with = "time::serde::rfc3339::option")]
pub date_created: Option<time::OffsetDateTime>,
#[serde(skip_serializing_if = "String::is_empty")]
pub status: String,
#[serde(skip_serializing_if = "String::is_empty")]
pub last_login: String,
#[serde(with = "time::serde::rfc3339::option")]
pub last_login: Option<time::OffsetDateTime>,
#[serde(skip_serializing_if = "init::is_uuid_nil")]
pub salt_id: uuid::Uuid,
}
@@ -42,9 +42,9 @@ impl Default for User {
firstname: String::new(),
lastname: String::new(),
email_verified: false,
date_created: String::new(),
date_created: None,
status: String::new(),
last_login: String::new(),
last_login: None,
salt_id: uuid::Uuid::nil(),
}
}