import { ApiPropertyOptional } from '@nestjs/swagger';
import {
  IsEmail,
  IsOptional,
  IsString,
  Matches,
  MaxLength,
  MinLength,
} from 'class-validator';

export class BootstrapSuperadminDto {
  @IsEmail()
  email!: string;

  @IsString()
  @MinLength(4)
  @MaxLength(72)
  password!: string;

  @IsOptional()
  @ApiPropertyOptional({ example: '+919876543210' })
  @Matches(/^\+?[1-9]\d{7,14}$/)
  phone?: string;
}
