import { IsEnum, IsOptional, IsString } from 'class-validator';
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';

export enum ImportEntityType {
  CONTACT = 'contact',
  COMPANY = 'company',
}

export class ImportPreviewQueryDto {
  @ApiProperty({
    enum: ImportEntityType,
    description: 'Ziel-Entitaet fuer den Import',
  })
  @IsEnum(ImportEntityType)
  entityType!: ImportEntityType;

  @ApiPropertyOptional({
    description: 'CSV-Trennzeichen (Standard: automatische Erkennung)',
  })
  @IsOptional()
  @IsString()
  delimiter?: string;
}
