import { BaseFilterDto } from 'src/core/modules/infrastructure/dto/base-filter.dto';
import { FilterBannerEntity } from '../../domain/entities/filter-banner.entity';
import { Transform } from 'class-transformer';
import { ApiProperty } from '@nestjs/swagger';

export class FilterBannerDto
  extends BaseFilterDto
  implements FilterBannerEntity
{
  @ApiProperty({ type: ['string'], required: false })
  @Transform((body) => {
    return Array.isArray(body.value) ? body.value : [body.value];
  })
  titles: string[];
}
