Skip to content

Commit

Permalink
updated work dtos
Browse files Browse the repository at this point in the history
  • Loading branch information
alxford45 committed Nov 29, 2020
1 parent bf89939 commit 5bc7d00
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
4 changes: 4 additions & 0 deletions api/src/work/dto/create-work.dto.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { OmitType as Omit } from '@nestjs/swagger';
import { WorkDTO } from './work.dto';

export class CreateWorkDTO extends Omit(WorkDTO, ['work_id']) {}
40 changes: 40 additions & 0 deletions api/src/work/dto/work.dto.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import { ApiProperty } from '@nestjs/swagger';

export enum WorkType {
'LSU_ID',
'TICKET_ID',
}

export class WorkDTO {
@ApiProperty({
readOnly: true,
description: 'serially generated id for work',
})
work_id: number;

@ApiProperty({
description: 'id that references ticket',
example: 1,
})
ticket_id: number;

@ApiProperty({
minLength: 9,
maxLength: 9,
description: '9-digit number starting with 89',
example: 897584512,
})
lsu_id: number;

@ApiProperty({
description: 'YYYY-MM-DD HH:MM:SS',
example: '2020-07-21 12:44:22',
})
start_datetime: string;

@ApiProperty({
description: 'YYYY-MM-DD HH:MM:SS',
example: '2020-07-21 12:44:22',
})
end_datetime: string;
}

0 comments on commit 5bc7d00

Please sign in to comment.