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

export class PlayerActionDto {
  @ApiProperty({ example: '76561198012345678', description: 'Steam ID' })
  @IsString()
  steam_id: string;

  @ApiProperty({ example: 'PlayerName', description: 'Player display name' })
  @IsString()
  player_name: string;

  @ApiProperty({
    example: 'kick',
    description: 'Type of action',
    enum: ['kick', 'ban', 'unban', 'warn', 'note'],
  })
  @IsIn(['kick', 'ban', 'unban', 'warn', 'note'])
  action_type: string;

  @ApiPropertyOptional({ example: 'Toxic behavior', description: 'Reason for action' })
  @IsOptional()
  @IsString()
  reason?: string;

  @ApiPropertyOptional({
    example: 1440,
    description: 'Duration in minutes (for bans)',
  })
  @IsOptional()
  @IsInt()
  duration_minutes?: number;
}
