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']) {}