Skip to content

Commit

Permalink
updated DTOs
Browse files Browse the repository at this point in the history
  • Loading branch information
alxford45 committed Nov 29, 2020
1 parent 7ca8e0d commit 7af81dd
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
14 changes: 14 additions & 0 deletions api/src/ticket/dto/update-combined.dto.ts
Original file line number Diff line number Diff line change
@@ -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,
) {}
4 changes: 4 additions & 0 deletions api/src/ticket/dto/update-device.dto.ts
Original file line number Diff line number Diff line change
@@ -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']) {}

0 comments on commit 7af81dd

Please sign in to comment.