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

agregando dtos para crear un place

parent 312899fe
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
import { ApiProperty } from '@nestjs/swagger';

export class CreateDateDto {
  @ApiProperty()
  startDate: Date;

  @ApiProperty()
  endDate: Date;

  idPlace: number;
}
+36 −0
Original line number Diff line number Diff line
import { ApiProperty } from '@nestjs/swagger';
import { Available } from 'src/activity/enum/available.enum';

export class CreatePlaceDateTradDto {
  @ApiProperty({ enum: Available, enumName: 'Available' })
  available: Available;

  @ApiProperty()
  idTown: number;

  @ApiProperty()
  name: string;

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

  @ApiProperty({ type: 'string', format: 'binary' })
  image;

  @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;

  @ApiProperty({ default: new Date() })
  startDate: Date;

  @ApiProperty({ default: new Date() })
  endDate: Date;
}
+12 −0
Original line number Diff line number Diff line
import { ApiProperty } from '@nestjs/swagger';
import { LANGUAGES } from 'src/shared/enum/languages.enum';

export class CreateTraductionPlaceDto {
  @ApiProperty()
  language: LANGUAGES = LANGUAGES.ES;
  @ApiProperty()
  idPlace: number;

  @ApiProperty()
  description: string;
}