import { Type } from 'class-transformer';
import { IsDate, IsEmail, IsNotEmpty, MaxDate } from 'class-validator';

export class LoginDto {
  username?: string;
  @IsEmail()
  email?: string;
  @IsNotEmpty()
  password: string;
}

export class RegisterDto {
  @IsNotEmpty()
  username?: string;

  @IsNotEmpty()
  @IsEmail()
  email: string;
  @IsNotEmpty()
  password: string;
  @IsNotEmpty()
  fullname: string;
  @IsNotEmpty()
  @IsDate()
  @Type(() => Date)
  birthday: Date;
}
