import { IsUnique } from '@/system/validators/decorators/is-unique';
import { IsEmail, IsString, MinLength } from 'class-validator';

export class CreateDto {
  @IsString()
  @IsEmail()
  @IsUnique({ tableName: 'admins', column: 'email' })
  email: string;

  @IsString()
  fullname: string;

  @IsString()
  @IsUnique({ tableName: 'admins', column: 'username' })
  username: string;

  @IsString()
  @MinLength(6)
  password: string;
}
