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

export class FormSubmissionDto {
  @ApiPropertyOptional()
  @IsString()
  @IsOptional()
  name?: string;

  @ApiPropertyOptional()
  @IsString()
  @IsOptional()
  phone?: string;

  @ApiPropertyOptional()
  @IsString()
  @IsOptional()
  email?: string;

  @ApiPropertyOptional()
  @IsString()
  @IsOptional()
  message?: string;

  @ApiPropertyOptional({ description: 'Honeypot field (should be empty)' })
  @IsString()
  @IsOptional()
  honeypot?: string;

  @ApiPropertyOptional({ description: 'Turnstile/hCaptcha token' })
  @IsString()
  @IsOptional()
  turnstileToken?: string;

  @ApiPropertyOptional({ description: 'Browser fingerprint' })
  @IsString()
  @IsOptional()
  fingerprint?: string;

  @ApiPropertyOptional({ description: 'Time in ms to fill the form' })
  @IsNumber()
  @IsOptional()
  formFilledMs?: number;

  @ApiPropertyOptional()
  @IsString()
  @IsOptional()
  source?: string;

  @ApiPropertyOptional()
  @IsString()
  @IsOptional()
  utm_source?: string;

  @ApiPropertyOptional()
  @IsString()
  @IsOptional()
  utm_medium?: string;

  @ApiPropertyOptional()
  @IsString()
  @IsOptional()
  utm_campaign?: string;

  @ApiPropertyOptional()
  @IsString()
  @IsOptional()
  utm_content?: string;

  @ApiPropertyOptional()
  @IsString()
  @IsOptional()
  utm_term?: string;
}
