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

creando dto para crear un place

parent 32834c30
Loading
Loading
Loading
Loading
+23 −1
Original line number Diff line number Diff line
export class CreatePlaceDto {}
import { ApiProperty } from '@nestjs/swagger';
import { Available } from 'src/activity/enum/available.enum';
import { Town } from 'src/town/entities/town.entity';

export class CreatePlaceDto {
  @ApiProperty({ enum: Available, enumName: 'Available' })
  available: Available;
  @ApiProperty()
  name: string;
  @ApiProperty()
  imageName: string;

  @ApiProperty({ type: 'number' })
  idTown: Town;
  @ApiProperty({ example: '12.3456789-12.3456789' })
  coords: string;
  // 24-hour format
  @ApiProperty({ maximum: 24, minimum: 0 })
  openAt: number;
  // 24-hour format
  @ApiProperty({ maximum: 24, minimum: 0 })
  closeAt: number;
}
+2 −2
Original line number Diff line number Diff line
import { PartialType } from '@nestjs/swagger';
import { CreatePlaceDto } from './create-place.dto';
import { CreatePlaceDateTradDto } from './create-place-date.dto';

export class UpdatePlaceDto extends PartialType(CreatePlaceDto) {}
export class UpdatePlaceDto extends PartialType(CreatePlaceDateTradDto) {}