import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
import { IsNotEmpty, IsBoolean, IsOptional, IsNumber, IsString, IsEnum } from 'class-validator';
import { UserRole } from 'common/enum/UserRole.enum';

export class ReviewAlertDto {
  @ApiProperty({ description: 'ID of the alert to be reviewed', example: 1 })
  @IsNotEmpty()
  @IsNumber()
  id: string;

  @ApiProperty({ description: 'Verification status of the alert', example: true })
  @IsNotEmpty()
  @IsBoolean()
  isVerified: boolean;

  @ApiProperty({ description: 'User role who verified the alert', enum: UserRole, example: UserRole.ADMIN })
  @IsNotEmpty()
  @IsEnum(UserRole)
  verifiedBy: UserRole;

  @ApiPropertyOptional({ description: 'Severity level of the alert', example: 5 })
  @IsOptional()
  @IsNumber()
  severity?: number;

  @ApiPropertyOptional({ description: 'Whether the attack is relevant to Nepal', example: true })
  @IsOptional()
  @IsBoolean()
  isRelevantToNepal?: boolean;
}
