Added more impls

This commit is contained in:
Franklin 2023-01-21 16:37:35 -04:00
parent 6d2814e8ee
commit b14726c7e6
2 changed files with 2 additions and 2 deletions

View File

@ -4,7 +4,7 @@ use serde::{Serialize, Deserialize};
pub const AUTH_TOKEN_EXPIRATION_TIME_IN_DAYS:i32 = 1; pub const AUTH_TOKEN_EXPIRATION_TIME_IN_DAYS:i32 = 1;
pub const REFRESH_TOKEN_EXPIRATION_TIME_IN_DAYS: i32 = 20; pub const REFRESH_TOKEN_EXPIRATION_TIME_IN_DAYS: i32 = 20;
#[derive(Serialize, Deserialize)] #[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, Eq, PartialOrd, Ord)]
pub struct Token { pub struct Token {
#[serde(skip_serializing, skip_deserializing)] #[serde(skip_serializing, skip_deserializing)]
pub id: i32, pub id: i32,

View File

@ -3,7 +3,7 @@ use serde::{Serialize, Deserialize};
use crate::dtos::user::user_dtos::UserForCreationDto; use crate::dtos::user::user_dtos::UserForCreationDto;
#[derive(Serialize, Deserialize, Debug)] #[derive(Serialize, Deserialize, Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord)]
pub struct User{ pub struct User{
pub id: i32, pub id: i32,
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]