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

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

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

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

  @ApiProperty({ enum: ['track_limits', 'unsafe_rejoin', 'aggressive_driving', 'false_start', 'other'] })
  @IsEnum(['track_limits', 'unsafe_rejoin', 'aggressive_driving', 'false_start', 'other'])
  infractionType!: 'track_limits' | 'unsafe_rejoin' | 'aggressive_driving' | 'false_start' | 'other';

  @ApiProperty({ enum: ['warning', 'minor', 'major', 'severe'] })
  @IsEnum(['warning', 'minor', 'major', 'severe'])
  severity!: 'warning' | 'minor' | 'major' | 'severe';

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