import { IsString, IsEmail, MinLength, IsBoolean } from 'class-validator';
import { Transform } from 'class-transformer';

export class CreateUserDto {
  @IsString()
  name: string;

  @IsEmail()
  email: string;

  @Transform(({ value }) => value?.trim())
  @IsString()
  @MinLength(6)
  password: string;

  @IsBoolean()
  isAdmin: boolean = false;
}
