Files
imphnen-backend-service/src/apps/v1/auth/auth_dto.rs
T

66 lines
1.5 KiB
Rust
Raw Normal View History

2025-03-20 22:41:20 +07:00
use crate::UsersItemDto;
2025-02-08 00:58:54 +07:00
use serde::{Deserialize, Serialize};
use utoipa::ToSchema;
#[derive(Clone, Debug, Serialize, Deserialize, ToSchema)]
pub struct AuthLoginRequestDto {
pub email: String,
pub password: String,
}
2025-02-26 15:45:05 +07:00
#[derive(Clone, Debug, Serialize, Deserialize, ToSchema)]
2025-03-13 23:40:16 +07:00
pub struct AuthLoginResponsetDto {
pub token: TokenDto,
2025-03-14 09:53:20 +07:00
pub user: UsersItemDto,
2025-03-13 23:40:16 +07:00
}
#[derive(Clone, Debug, Serialize, Deserialize, ToSchema)]
pub struct TokenDto {
pub access_token: String,
pub refresh_token: String,
2025-02-26 15:45:05 +07:00
}
#[derive(Clone, Debug, Serialize, Deserialize, ToSchema)]
pub struct AuthRegisterRequestDto {
pub email: String,
pub password: String,
pub fullname: String,
}
2025-03-14 17:50:37 +07:00
#[derive(Clone, Debug, Serialize, Deserialize, ToSchema)]
2025-03-18 14:13:53 +07:00
pub struct AuthActiveInactiveRequestDto {
pub is_active: bool,
pub email: String,
}
2025-03-19 23:17:50 +07:00
#[derive(Clone, Debug, Serialize, Deserialize, ToSchema)]
pub struct AuthVerifyEmailRequestDto {
pub email: String,
pub otp: u32,
}
#[derive(Clone, Debug, Serialize, Deserialize, ToSchema)]
pub struct AuthResendOtpRequestDto {
pub email: String,
}
#[derive(Clone, Debug, Serialize, Deserialize, ToSchema)]
pub struct AuthNewPasswordRequestDto {
pub token: String,
pub password: String,
}
#[derive(Clone, Debug, Serialize, Deserialize, ToSchema)]
pub struct AuthSetNewPasswordRequestDto {
pub email: String,
pub password: String,
}
2025-03-18 14:13:53 +07:00
#[derive(Clone, Debug, Serialize, Deserialize, ToSchema)]
pub struct AuthQueryByEmailResponseDto {
2025-03-14 17:50:37 +07:00
pub email: String,
pub fullname: String,
pub password: String,
2025-03-18 14:13:53 +07:00
pub is_active: bool,
2025-03-14 17:50:37 +07:00
}