1
0
forked from Yara724/api
Files
yara724-api/src/request-management/dto/expert-initiated.dto.ts

40 lines
1.1 KiB
TypeScript

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;
}