import { ApiPropertyOptional } from '@nestjs/swagger';
import { IsEnum, IsMongoId, IsOptional } from 'class-validator';
import { ModerationStatus } from '../../../common/enums/moderation-status.enum';
import { PostQueryDto } from './post-query.dto';

export class AdminPostQueryDto extends PostQueryDto {
  @ApiPropertyOptional({ description: 'Optional author filter' })
  @IsOptional()
  @IsMongoId()
  authorId?: string;

  @ApiPropertyOptional({ enum: ModerationStatus, description: 'Optional moderation status filter' })
  @IsOptional()
  @IsEnum(ModerationStatus)
  moderationStatus?: ModerationStatus;
}
