1use chrono::prelude::*;
2use serde::{Deserialize, Serialize};
3
4#[allow(non_snake_case)]
5#[derive(Debug, Deserialize, sqlx::FromRow, Serialize, Clone)]
6pub struct User {
7 pub id: uuid::Uuid,
8 pub name: String,
9 pub email: String,
10 pub password: String,
11 pub role: String,
12 pub photo: String,
13 pub verified: bool,
14 pub database: String,
15 #[serde(rename = "createdAt")]
16 pub created_at: Option<DateTime<Utc>>,
17 #[serde(rename = "updatedAt")]
18 pub updated_at: Option<DateTime<Utc>>,
19}
20
21#[derive(Debug, Deserialize)]
22pub struct RegisterUserSchema {
23 pub name: String,
24 pub email: String,
25 pub password: String,
26}
27
28#[derive(Debug, Deserialize)]
29pub struct LoginUserSchema {
30 pub email: String,
31 pub password: String,
32}