Commit 62c90166 authored by Diego Iván's avatar Diego Iván
Browse files

agregando categoriesId al dto para agregar un Place

parent 8803cc79
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
import { ApiProperty } from '@nestjs/swagger';
import { Available } from 'src/pointOfInterest/enum/available.enum';
import { Transform } from 'class-transformer';
import { IsArray } from 'class-validator';

export class CreatePlaceDateTradDto {
  @ApiProperty({ enum: Available, enumName: 'Available' })
@@ -11,6 +13,11 @@ export class CreatePlaceDateTradDto {
  @ApiProperty()
  name: string;

  @ApiProperty({ type: String, description: 'Comma-separated list of category IDs', example: '1,2,3' })
  @IsArray({})
  @Transform(({ value }) => value.split(',').map(Number))
  categoriesId: number[];

  @ApiProperty()
  descriptionES: string;
  @ApiProperty()