import { ApiProperty } from '@nestjs/swagger';
import { IsIn, IsNotEmpty } from 'class-validator';
import { SortAction } from '../../../utils/sort';

export class AnnouncementSortDto {
  @ApiProperty({ required: false })
  @IsNotEmpty()
  id: string;

  @ApiProperty({ required: false, enum: SortAction })
  @IsNotEmpty()
  @IsIn(Object.values(SortAction))
  action: SortAction;
}
