From 6a48b57d63c219e7b6f8308dba29c2c7fc8390fb Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 27 Nov 2020 21:39:25 -0600 Subject: [PATCH] refactored naming; added TIcketType enum --- api/src/ticket/dto/ticket.dto.ts | 72 +++++++++++++++++++------------- 1 file changed, 42 insertions(+), 30 deletions(-) diff --git a/api/src/ticket/dto/ticket.dto.ts b/api/src/ticket/dto/ticket.dto.ts index dfbb78d..54d725f 100644 --- a/api/src/ticket/dto/ticket.dto.ts +++ b/api/src/ticket/dto/ticket.dto.ts @@ -1,28 +1,36 @@ import { ApiProperty } from '@nestjs/swagger'; -enum Priority { - low = 'low', - medium = 'medium', - high = 'high', +export enum TicketType { + 'OPENED', + 'CLOSED', + 'ANY', } -export class TicketDto { + +export class Ticket { @ApiProperty({ readOnly: true }) ticket_id: number; @ApiProperty({ - minLength: 3, - maxLength: 5, - enum: Priority, - description: 'low, medium, high', - example: Priority.low, + minLength: 9, + maxLength: 9, + description: '9-digit number starting with 89', + example: 897584512, }) - priority: string; + lsu_id: number; + + @ApiProperty({ + minimum: 1, + maximum: 3, + description: 'low=1, medium=2, high=3', + example: 1, + }) + priority: number; @ApiProperty({ description: 'opened or closed', example: 'opened' }) status: string; @ApiProperty({ description: 'category of issue', example: 'General Help' }) - category: string; + problem_category: string; @ApiProperty({ description: 'description of issue', @@ -35,26 +43,30 @@ export class TicketDto { description: 'label of problem student is facing', example: 'computer slowdown', }) - problem: string; - - @ApiProperty({ description: 'manufacturer of device', example: 'dell' }) - manufacturer: string; + core_issue: string; @ApiProperty({ - minLength: 1, - description: 'model of device', - example: '15', + description: 'YYYY-MM-DD HH:MM:SS', }) - model: number; + submission_date: string; +} +// @ApiProperty({ description: 'manufacturer of device', example: 'dell' }) +// manufacturer: string; - @ApiProperty({ - minLength: 1, - description: 'operating system', - example: 'windows', - }) - os: string; +// @ApiProperty({ +// minLength: 1, +// description: 'model of device', +// example: '15', +// }) +// model: number; - // Not sure of example data for os version - @ApiProperty({ description: 'operating system version', example: 'version1' }) - version: string; -} +// @ApiProperty({ +// minLength: 1, +// description: 'operating system', +// example: 'windows', +// }) +// os: string; + +// // Not sure of example data for os version +// @ApiProperty({ description: 'operating system version', example: 'version1' }) +// version: string;