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

export class PublishAlertDto {
  @ApiProperty({ description: 'The unique identifier for the alert', example: 1 })
  @IsNotEmpty()
  id: string;

  @ApiPropertyOptional({ description: 'Whether to send the alert to the newsletter', example: true })
  @IsOptional()
  @IsBoolean()
  sendToNewsletter?: boolean;
}
