import { ApiProperty } from '@nestjs/swagger';
import { CatalogItemShortDto } from './catalog-item.dto';
import { CatalogFiltersDto } from './catalog-filters.dto';

export class CatalogResponseDto {
  @ApiProperty({ type: [CatalogItemShortDto] })
  items: CatalogItemShortDto[];

  @ApiProperty({ example: 42 })
  total: number;

  @ApiProperty({ required: false, example: 1 })
  page?: number;

  @ApiProperty({ required: false, example: 10 })
  limit?: number;

  @ApiProperty({ type: CatalogFiltersDto, required: false })
  filters?: CatalogFiltersDto;

  @ApiProperty({
    required: false,
    example: { field: 'name', direction: 'asc' },
  })
  sort?: any;

  @ApiProperty({ required: false, example: 'yacht' })
  search?: string;
}
