Adding UserProfile (#10)
Release Tagging / release (push) Failing after 26s
Rust Build / Check (push) Successful in 35s
Rust Build / Test Suite (push) Successful in 27s
Rust Build / Rustfmt (push) Successful in 29s
Rust Build / Clippy (push) Successful in 30s
Rust Build / build (push) Successful in 24s
Release Tagging / release (push) Failing after 26s
Rust Build / Check (push) Successful in 35s
Rust Build / Test Suite (push) Successful in 27s
Rust Build / Rustfmt (push) Successful in 29s
Rust Build / Clippy (push) Successful in 30s
Rust Build / build (push) Successful in 24s
Reviewed-on: phoenix/textsender-models#10
This commit was merged in pull request #10.
This commit is contained in:
@@ -43,3 +43,26 @@ pub struct ServiceUserLoginHistory {
|
|||||||
pub login_time: Option<time::OffsetDateTime>,
|
pub login_time: Option<time::OffsetDateTime>,
|
||||||
pub service_user_id: uuid::Uuid,
|
pub service_user_id: uuid::Uuid,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
|
||||||
|
pub struct UserProfile {
|
||||||
|
pub user_id: uuid::Uuid,
|
||||||
|
pub phone_number: String,
|
||||||
|
pub username: String,
|
||||||
|
pub firstname: String,
|
||||||
|
pub lastname: String,
|
||||||
|
pub created: Option<time::OffsetDateTime>,
|
||||||
|
pub last_login: Option<time::OffsetDateTime>,
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn init_user_profile(usr: &User) -> UserProfile {
|
||||||
|
UserProfile {
|
||||||
|
user_id: usr.id,
|
||||||
|
phone_number: usr.phone_number.clone(),
|
||||||
|
username: usr.username.clone(),
|
||||||
|
firstname: usr.firstname.clone(),
|
||||||
|
lastname: usr.lastname.clone(),
|
||||||
|
created: usr.created,
|
||||||
|
last_login: usr.last_login,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user