1
0
forked from Yara724/api

blame and claim refactored

This commit is contained in:
2026-02-24 12:19:25 +03:30
parent 0d8858f458
commit 35732dd70a
81 changed files with 11603 additions and 77 deletions

View File

@@ -0,0 +1,70 @@
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
import {
IsString,
IsNotEmpty,
IsArray,
IsBoolean,
IsOptional,
ValidateNested,
} from 'class-validator';
import { Type } from 'class-transformer';
export class CarPartDamageV2Dto {
@ApiProperty({ example: 'left' })
@IsString()
side: string;
@ApiProperty({ example: 'front_door' })
@IsString()
part: string;
}
export class PartPricingV2Dto {
@ApiProperty({ example: 'part-001' })
@IsString()
@IsNotEmpty()
partId: string;
@ApiProperty({ type: CarPartDamageV2Dto })
@ValidateNested()
@Type(() => CarPartDamageV2Dto)
carPartDamage: CarPartDamageV2Dto;
@ApiProperty({ example: 'Minor' })
@IsString()
typeOfDamage: string;
@ApiProperty({ example: '5000000' })
@IsString()
price: string;
@ApiProperty({ example: '2000000' })
@IsString()
salary: string;
@ApiProperty({ example: '7000000' })
@IsString()
totalPayment: string;
@ApiPropertyOptional({ example: '500000' })
@IsOptional()
@IsString()
daghi?: string;
@ApiProperty({ example: false })
@IsBoolean()
factorNeeded: boolean;
}
export class SubmitExpertReplyV2Dto {
@ApiProperty({ example: 'Front door and hood have severe paint damage' })
@IsString()
@IsNotEmpty()
description: string;
@ApiProperty({ type: [PartPricingV2Dto] })
@IsArray()
@ValidateNested({ each: true })
@Type(() => PartPricingV2Dto)
parts: PartPricingV2Dto[];
}