Added more impls
This commit is contained in:
parent
6d2814e8ee
commit
b14726c7e6
|
@ -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,
|
||||||
|
|
|
@ -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")]
|
||||||
|
|
Loading…
Reference in New Issue