From 7af81dd03cd17434521f8298b50c0d5b3c4b8a70 Mon Sep 17 00:00:00 2001 From: Alex Date: Sat, 28 Nov 2020 20:39:54 -0600 Subject: [PATCH] updated DTOs --- api/src/ticket/dto/update-combined.dto.ts | 14 ++++++++++++++ api/src/ticket/dto/update-device.dto.ts | 4 ++++ 2 files changed, 18 insertions(+) create mode 100644 api/src/ticket/dto/update-combined.dto.ts create mode 100644 api/src/ticket/dto/update-device.dto.ts diff --git a/api/src/ticket/dto/update-combined.dto.ts b/api/src/ticket/dto/update-combined.dto.ts new file mode 100644 index 0000000..c09248b --- /dev/null +++ b/api/src/ticket/dto/update-combined.dto.ts @@ -0,0 +1,14 @@ +import { IntersectionType } from '@nestjs/swagger'; +import { UpdateUserDTO } from 'src/user/dto/update-user.dto'; +import { UpdateDeviceDTO } from './update-device.dto'; +import { UpdateTicketDto } from './update-ticket.dto'; + +class UpdateTicketandDevice extends IntersectionType( + UpdateTicketDto, + UpdateDeviceDTO, +) {} + +export class UpdateCombinedDTO extends IntersectionType( + UpdateTicketandDevice, + UpdateUserDTO, +) {} diff --git a/api/src/ticket/dto/update-device.dto.ts b/api/src/ticket/dto/update-device.dto.ts new file mode 100644 index 0000000..abfd6e5 --- /dev/null +++ b/api/src/ticket/dto/update-device.dto.ts @@ -0,0 +1,4 @@ +import { CreateDeviceDTO } from './create-device.dto'; +import { OmitType as Omit } from '@nestjs/swagger'; + +export class UpdateDeviceDTO extends Omit(CreateDeviceDTO, ['ticket_id']) {}