From b14726c7e6f788005a6177b3049589508a1263ae Mon Sep 17 00:00:00 2001 From: Franklin Date: Sat, 21 Jan 2023 16:37:35 -0400 Subject: [PATCH] Added more impls --- src/domain/user/token.rs | 2 +- src/domain/user/user.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/domain/user/token.rs b/src/domain/user/token.rs index a4d4fc5..2ad6619 100644 --- a/src/domain/user/token.rs +++ b/src/domain/user/token.rs @@ -4,7 +4,7 @@ use serde::{Serialize, Deserialize}; pub const AUTH_TOKEN_EXPIRATION_TIME_IN_DAYS:i32 = 1; 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 { #[serde(skip_serializing, skip_deserializing)] pub id: i32, diff --git a/src/domain/user/user.rs b/src/domain/user/user.rs index 7a31c71..48ac15d 100644 --- a/src/domain/user/user.rs +++ b/src/domain/user/user.rs @@ -3,7 +3,7 @@ use serde::{Serialize, Deserialize}; 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 id: i32, #[serde(skip_serializing_if = "Option::is_none")]