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

/**
 * UTM attribution parameters (first-touch)
 */
export class AttributionDto {
  @ApiProperty({ description: 'UTM source (e.g., google, newsletter)', required: false })
  @IsOptional()
  @IsString()
  utmSource?: string;

  @ApiProperty({ description: 'UTM medium (e.g., cpc, email)', required: false })
  @IsOptional()
  @IsString()
  utmMedium?: string;

  @ApiProperty({ description: 'UTM campaign name', required: false })
  @IsOptional()
  @IsString()
  utmCampaign?: string;

  @ApiProperty({ description: 'UTM content (for A/B testing)', required: false })
  @IsOptional()
  @IsString()
  utmContent?: string;

  @ApiProperty({ description: 'UTM term (paid search keyword)', required: false })
  @IsOptional()
  @IsString()
  utmTerm?: string;

  @ApiProperty({ description: 'Referrer URL', required: false })
  @IsOptional()
  @IsString()
  referrer?: string;
}
