ticket
This commit is contained in:
@@ -2,7 +2,7 @@ import { ApiProperty } from "@nestjs/swagger";
|
||||
import { ArrayMinSize, IsEnum, IsNotEmpty, IsOptional, IsString, IsUUID, IsUrl, Length } from "class-validator";
|
||||
|
||||
import { TicketMessageEnum, UserMessage } from "../../../common/enums/message.enum";
|
||||
import { TicketPriority } from "../enums/ticket-priority.enum";
|
||||
|
||||
|
||||
export class CreateTicketDto {
|
||||
// @IsNotEmpty({ message: TicketMessageEnum.TITLE_REQUIRED })
|
||||
@@ -17,10 +17,6 @@ export class CreateTicketDto {
|
||||
@ApiProperty({ description: "Subject of the ticket", example: "Subject" })
|
||||
subject: string;
|
||||
|
||||
@IsNotEmpty({ message: TicketMessageEnum.PRIORITY_REQUIRED })
|
||||
@IsEnum(TicketPriority, { message: TicketMessageEnum.PRIORITY_INVALID })
|
||||
@ApiProperty({ enum: TicketPriority, example: TicketPriority.LOW, description: "LOW, MEDIUM, HIGH" })
|
||||
priority: TicketPriority;
|
||||
|
||||
@IsOptional()
|
||||
@IsNotEmpty({ message: TicketMessageEnum.DANAK_SERVICE_ID_REQUIRED })
|
||||
@@ -48,8 +44,8 @@ export class CreateTicketDto {
|
||||
}
|
||||
|
||||
export class CreateTicketByAdminDto extends CreateTicketDto {
|
||||
@IsNotEmpty({ message: UserMessage.USER_ID_REQUIRED })
|
||||
@IsUUID("4", { message: UserMessage.USER_ID_SHOULD_BE_A_UUID })
|
||||
@IsNotEmpty({ message: "UserMessage.USER_ID_REQUIRED" })
|
||||
@IsUUID("4", { message:" UserMessage.USER_ID_SHOULD_BE_A_UUID" })
|
||||
@ApiProperty({ description: "User ID of the ticket", example: "123e4567-e89b-12d3-a456-426614174000" })
|
||||
userId: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user