import { IsString, IsEmail, IsDateString, IsEnum, IsOptional, IsArray, IsBoolean } from 'class-validator';
import { DriverStatus, DriverGender } from '../entities/driver.entity';

export class CreateDriverDto {
  @IsString()
  licenseNumber!: string;

  @IsString()
  firstName!: string;

  @IsString()
  lastName!: string;

  @IsEmail()
  email!: string;

  @IsString()
  phoneNumber!: string;

  @IsDateString()
  dateOfBirth!: string;

  @IsOptional()
  @IsEnum(DriverGender)
  gender?: DriverGender;

  @IsDateString()
  licenseExpiryDate!: string;

  @IsEnum(DriverStatus)
  status!: DriverStatus;

  @IsOptional()
  @IsArray()
  @IsString({ each: true })
  vehicleTypesAuthorized?: string[];

  @IsOptional()
  @IsString()
  address?: string;

  @IsOptional()
  @IsString()
  emergencyContact?: string;

  @IsOptional()
  @IsString()
  notes?: string;

  @IsOptional()
  @IsBoolean()
  faydaVerified?: boolean;

  @IsOptional()
  @IsString()
  faydaSub?: string;
}
