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

export class BanUserDto {
  @ApiProperty({ description: 'ID of the user to ban/unban', example: 'usr_abc123' })
  @IsString()
  userId!: string;

  @ApiProperty({ description: 'Reason for ban/unban action (min 5 chars)', example: 'Repeated policy violations', minLength: 5 })
  @IsString()
  @MinLength(5)
  reason!: string;

  @ApiPropertyOptional({ description: 'Set to true to unban the user', default: false })
  @IsOptional()
  @IsBoolean()
  unban?: boolean;
}
