import { ApiProperty, PickType } from "@nestjs/swagger"; import { IsEmail, IsNotEmpty, IsString } from "class-validator"; import { AuthMessage } from "../../../common/enums/message.enum"; export class LoginPasswordDTO { @IsNotEmpty({ message: AuthMessage.EMAIL_NOT_EMPTY }) @IsEmail(undefined, { message: AuthMessage.INVALID_EMAIL_FORMAT }) @ApiProperty({ description: "email of user", default: "user@test.ir" }) email: string; @IsNotEmpty({ message: AuthMessage.PasswordNotEmpty }) @IsString({ message: AuthMessage.INVALID_PASS_FORMAT }) @ApiProperty({ type: "string", description: "password user", example: "@1234" }) password: string; } export class CheckUserExistDto extends PickType(LoginPasswordDTO, ["email"] as const) {}