import { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger"; import { IsOptional, IsString, Length } from "class-validator"; /** `POST /v1/cancel` body — `ReasonCode`/`Remark` are the collection's own field names. */ export class CancelEimsRegistrationDto { @ApiProperty({ description: 'Numeric reason code, e.g. "1" (Duplicate), "6" (Calculation Error).', example: "1", }) @IsString() @Length(1, 8) reasonCode!: string; @ApiPropertyOptional({ description: "Free-text cancellation note.", example: "Duplicate submission" }) @IsOptional() @IsString() @Length(0, 500) remark?: string; }