2023-04-03 23:14:07 -06:00
|
|
|
import { Type } from 'class-transformer';
|
2023-04-05 00:30:03 -06:00
|
|
|
import { IsNotEmpty, ValidateIf, Max, Min, MaxLength } from 'class-validator';
|
2023-04-03 13:04:32 -06:00
|
|
|
|
|
|
|
export class SignedGodTokenDTO {
|
|
|
|
@IsNotEmpty()
|
|
|
|
signature: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export class RetrieveFriendDTO {
|
2023-04-03 23:14:07 -06:00
|
|
|
@ValidateIf((rfd) => !rfd.name || rfd.id)
|
2023-04-03 13:04:32 -06:00
|
|
|
name: string;
|
2023-04-03 23:14:07 -06:00
|
|
|
|
|
|
|
@ValidateIf((rfd) => !rfd.id || rfd.name)
|
2023-04-04 09:11:34 -06:00
|
|
|
@Type(() => Number)
|
2023-04-03 23:14:07 -06:00
|
|
|
id: number;
|
2023-04-03 13:04:32 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
export class CreateTimerDTO {
|
|
|
|
@IsNotEmpty()
|
2023-04-05 00:30:03 -06:00
|
|
|
@MaxLength(80)
|
2023-04-03 13:04:32 -06:00
|
|
|
name: string;
|
|
|
|
}
|
2023-04-03 23:14:07 -06:00
|
|
|
|
2023-04-05 00:30:03 -06:00
|
|
|
export class RetrieveTimerDTO {
|
2023-04-03 23:14:07 -06:00
|
|
|
@Type(() => Number)
|
|
|
|
id: number;
|
|
|
|
}
|
2023-04-05 00:30:03 -06:00
|
|
|
|
|
|
|
export class GetPageDTO {
|
|
|
|
@Type(() => Number)
|
|
|
|
@Max(500)
|
|
|
|
@Min(1)
|
|
|
|
take = 100;
|
|
|
|
|
|
|
|
@Type(() => Number)
|
|
|
|
skip = 0;
|
|
|
|
}
|