2025-03-14 17:50:37 +07:00
|
|
|
use serde::{Deserialize, Serialize};
|
2025-03-21 05:36:00 +07:00
|
|
|
use surrealdb::sql::Thing;
|
2025-03-14 17:50:37 +07:00
|
|
|
|
2025-03-20 22:41:20 +07:00
|
|
|
#[derive(Clone, Debug, Serialize, Deserialize)]
|
2025-03-14 17:50:37 +07:00
|
|
|
pub struct UsersSchema {
|
2025-03-21 05:36:00 +07:00
|
|
|
pub id: Option<String>,
|
|
|
|
|
pub role_id: String,
|
2025-03-14 17:50:37 +07:00
|
|
|
pub fullname: String,
|
2025-03-21 05:36:00 +07:00
|
|
|
pub email: String,
|
2025-03-14 17:50:37 +07:00
|
|
|
pub password: String,
|
2025-03-21 05:36:00 +07:00
|
|
|
pub avatar: Option<String>,
|
|
|
|
|
pub phone_number: String,
|
|
|
|
|
pub referral_code: Option<String>,
|
|
|
|
|
pub referred_by: Option<String>,
|
|
|
|
|
pub identity_number: Option<String>,
|
2025-03-18 14:13:53 +07:00
|
|
|
pub is_active: bool,
|
2025-03-21 05:36:00 +07:00
|
|
|
pub student_type: String,
|
|
|
|
|
pub religion: Option<String>,
|
|
|
|
|
pub gender: Option<String>,
|
|
|
|
|
pub birthdate: Option<String>,
|
|
|
|
|
pub is_profile_completed: Option<bool>,
|
|
|
|
|
pub role: Thing,
|
|
|
|
|
pub created_at: Option<String>,
|
|
|
|
|
pub updated_at: Option<String>,
|
2025-03-14 17:50:37 +07:00
|
|
|
}
|
2025-03-20 22:41:20 +07:00
|
|
|
|
|
|
|
|
#[derive(Clone, Debug, Serialize, Deserialize)]
|
|
|
|
|
pub struct UsersSetNewPasswordSchema {
|
|
|
|
|
pub email: String,
|
2025-03-21 05:36:00 +07:00
|
|
|
pub password: String,
|
2025-03-20 22:41:20 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[derive(Clone, Debug, Serialize, Deserialize)]
|
|
|
|
|
pub struct UsersActiveInactiveSchema {
|
|
|
|
|
pub email: String,
|
|
|
|
|
pub is_active: bool,
|
|
|
|
|
}
|