import { IsEmail, IsString, MinLength, IsOptional, IsBoolean } from 'class-validator';
import { ErrorCode } from '../../../common/errors';

export class LoginDto {
  @IsEmail({}, { message: ErrorCode.VALIDATION_EMAIL_INVALID })
  email: string;

  @IsString()
  @MinLength(6, { message: ErrorCode.VALIDATION_PASSWORD_TOO_SHORT })
  password: string;

  @IsOptional()
  @IsBoolean()
  rememberMe?: boolean;
}
