import { IsInt, IsOptional, IsString, Max, MaxLength, Min, MinLength, } from 'class-validator'; import { Type } from 'class-transformer'; export class PortalRequestOtpDto { @IsString() @MinLength(10) @MaxLength(20) mobile!: string; } export class PortalVerifyOtpDto { @IsString() @MinLength(10) @MaxLength(20) mobile!: string; @IsString() @MinLength(4) @MaxLength(8) code!: string; } export class PortalCreateTicketDto { @IsString() @MinLength(2) @MaxLength(200) subject!: string; @IsOptional() @IsString() @MaxLength(8000) description?: string; @IsOptional() @IsString() priority?: string; } export class PortalCreateMessageDto { @IsString() @MinLength(1) @MaxLength(8000) body!: string; } export class PortalCsatDto { @Type(() => Number) @IsInt() @Min(1) @Max(5) csatScore!: number; @IsOptional() @IsString() @MaxLength(2000) csatComment?: string | null; }