import { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger"; import { IsEnum, IsOptional, IsString } from "class-validator"; import { CreationMethod } from "../entities/schema/request-management.schema"; export class CreateExpertInitiatedFileDto { @ApiProperty({ description: "Type of blame file", enum: ["THIRD_PARTY", "CAR_BODY"], example: "THIRD_PARTY", }) @IsEnum(["THIRD_PARTY", "CAR_BODY"]) type: "THIRD_PARTY" | "CAR_BODY"; @ApiProperty({ description: "Method of creation", enum: CreationMethod, example: CreationMethod.IN_PERSON, }) @IsEnum(CreationMethod) creationMethod: CreationMethod; // Phone numbers for LINK method - users will access files via normal login @ApiPropertyOptional({ description: "First party phone number. Required for LINK method.", example: "09123456789", }) @IsOptional() @IsString() firstPartyPhoneNumber?: string; @ApiPropertyOptional({ description: "Second party phone number. Required for LINK method when type is THIRD_PARTY.", example: "09187654321", }) @IsOptional() @IsString() secondPartyPhoneNumber?: string; }