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

export class FileProtestCommandDTO {
  @ApiProperty()
  @IsString()
  @IsNotEmpty()
  raceId!: string;

  @ApiProperty()
  @IsString()
  @IsNotEmpty()
  protestingDriverId!: string;

  @ApiProperty()
  @IsString()
  @IsNotEmpty()
  accusedDriverId!: string;

  @ApiProperty()
  incident!: {
    lap: number;
    description: string;
    timeInRace?: number;
  };

  @ApiProperty({ required: false })
  @IsOptional()
  @IsString()
  comment?: string;

  @ApiProperty({ required: false })
  @IsOptional()
  @IsString()
  @IsUrl()
  proofVideoUrl?: string;
}