Updated user scheme

Forgot password and username
This commit is contained in:
2026-04-24 17:49:52 +02:00
parent b94a94a28e
commit fe04483e76
2 changed files with 25 additions and 0 deletions

View File

@@ -33,6 +33,7 @@ pub struct User {
pub first_name: String,
pub last_name: String,
pub is_admin: bool,
pub pwd: String,
}
#[derive(Deserialize, Serialize, Debug)]
@@ -47,3 +48,25 @@ pub struct TicketCreateScheme {
pub struct TicketUpdateScheme {
pub status: String,
}
#[derive(Deserialize, Serialize, Debug)]
pub struct UserCreateScheme {
pub first_name: String,
pub last_name: String,
pub username: String,
pub is_admin: bool,
pub pwd: String,
}
#[derive(Deserialize, Serialize, Debug)]
pub struct LoginScheme {
pub username: String,
pub pwd: String,
}
#[derive(Debug, Serialize, Deserialize, Clone)]
pub struct Claims {
pub subject: String,
pub issued: usize,
pub expires: usize,
}