forked from Yara724/api
location default changed
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { ApiProperty, ApiPropertyOptional, OmitType } from "@nestjs/swagger";
|
||||
import { Type } from "class-transformer";
|
||||
import { ApiProperty, ApiPropertyOptional, OmitType } from '@nestjs/swagger';
|
||||
import { Type } from 'class-transformer';
|
||||
import {
|
||||
IsArray,
|
||||
IsEmail,
|
||||
@@ -10,20 +10,20 @@ import {
|
||||
IsOptional,
|
||||
IsString,
|
||||
ValidateNested,
|
||||
} from "class-validator";
|
||||
import { RoleEnum } from "src/Types&Enums/role.enum";
|
||||
import { UserType } from "src/Types&Enums/userType.enum";
|
||||
} from 'class-validator';
|
||||
import { RoleEnum } from 'src/Types&Enums/role.enum';
|
||||
import { UserType } from 'src/Types&Enums/userType.enum';
|
||||
|
||||
export class ExpertLocationDto {
|
||||
@ApiProperty({
|
||||
example: "210050",
|
||||
description: "Fanavaran Location / OpBUId",
|
||||
example: '110011',
|
||||
description: 'Fanavaran Location / OpBUId',
|
||||
})
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
id: string;
|
||||
|
||||
@ApiProperty({ example: "شعبه غرب" })
|
||||
@ApiProperty({ example: 'شعبه غرب' })
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
name: string;
|
||||
@@ -36,62 +36,62 @@ export class CreateInsurerExpertDto {
|
||||
@Matches(/^\d+$/)
|
||||
expertCode?: string;
|
||||
|
||||
@ApiPropertyOptional({ description: "کارشناس مسئول پرونده مالی" })
|
||||
@ApiPropertyOptional({ description: 'کارشناس مسئول پرونده مالی' })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@Matches(/^\d+$/)
|
||||
ThirdPartyClaimExpertId?: string;
|
||||
|
||||
@ApiPropertyOptional({ description: "کارشناس مسئول پرونده بدنه" })
|
||||
@ApiPropertyOptional({ description: 'کارشناس مسئول پرونده بدنه' })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@Matches(/^\d+$/)
|
||||
CarBodyClaimExpertId?: string;
|
||||
|
||||
@ApiPropertyOptional({ description: "کارشناس ارزیاب خسارت ثالث مالی" })
|
||||
@ApiPropertyOptional({ description: 'کارشناس ارزیاب خسارت ثالث مالی' })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@Matches(/^\d+$/)
|
||||
ThirdPartyExpertiseClaim?: string;
|
||||
|
||||
@ApiPropertyOptional({ description: "کارشناس ارزیاب خسارت بدنه" })
|
||||
@ApiPropertyOptional({ description: 'کارشناس ارزیاب خسارت بدنه' })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@Matches(/^\d+$/)
|
||||
CarBodyExpertiseClaim?: string;
|
||||
|
||||
@ApiProperty({ example: "Ali" })
|
||||
@ApiProperty({ example: 'Ali' })
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
firstName: string;
|
||||
|
||||
@ApiProperty({ example: "Ahmadi" })
|
||||
@ApiProperty({ example: 'Ahmadi' })
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
lastName: string;
|
||||
|
||||
@ApiProperty({ example: "1234567890" })
|
||||
@ApiProperty({ example: '1234567890' })
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
nationalCode: string;
|
||||
|
||||
@ApiProperty({ example: "expert@example.com" })
|
||||
@ApiProperty({ example: 'expert@example.com' })
|
||||
@IsEmail()
|
||||
email: string;
|
||||
|
||||
@ApiProperty({ example: "StrongPass!123" })
|
||||
@ApiProperty({ example: 'StrongPass!123' })
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
password: string;
|
||||
|
||||
@ApiProperty({ example: "09121234567" })
|
||||
@ApiProperty({ example: '09121234567' })
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
mobile: string;
|
||||
|
||||
@ApiProperty({
|
||||
example: "665f0e5ab74d670939b08920",
|
||||
description: "Branch id this expert belongs to",
|
||||
example: '665f0e5ab74d670939b08920',
|
||||
description: 'Branch id this expert belongs to',
|
||||
})
|
||||
@IsMongoId()
|
||||
branchId: string;
|
||||
@@ -101,22 +101,22 @@ export class CreateInsurerExpertDto {
|
||||
@IsEnum(UserType)
|
||||
userType?: UserType;
|
||||
|
||||
@ApiPropertyOptional({ example: "02112345678" })
|
||||
@ApiPropertyOptional({ example: '02112345678' })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
phone?: string;
|
||||
|
||||
@ApiPropertyOptional({ example: "Tehran" })
|
||||
@ApiPropertyOptional({ example: 'Tehran' })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
state?: string;
|
||||
|
||||
@ApiPropertyOptional({ example: "Tehran" })
|
||||
@ApiPropertyOptional({ example: 'Tehran' })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
city?: string;
|
||||
|
||||
@ApiPropertyOptional({ example: "No. 12, Sample St." })
|
||||
@ApiPropertyOptional({ example: 'No. 12, Sample St.' })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
address?: string;
|
||||
@@ -124,7 +124,7 @@ export class CreateInsurerExpertDto {
|
||||
@ApiPropertyOptional({
|
||||
type: [ExpertLocationDto],
|
||||
description:
|
||||
"Fanavaran Location entries (id = OpBUId). Sent as the HTTP Location header on Fanavaran business calls for this expert.",
|
||||
'Fanavaran Location entries (id = OpBUId). Sent as the HTTP Location header on Fanavaran business calls for this expert.',
|
||||
})
|
||||
@IsOptional()
|
||||
@IsArray()
|
||||
@@ -151,7 +151,7 @@ export class CreateClaimExpertByInsurerDto extends CreateInsurerExpertDto {
|
||||
|
||||
export class CreateFileMakerByInsurerDto extends OmitType(
|
||||
CreateInsurerExpertDto,
|
||||
["ThirdPartyExpertiseClaim", "CarBodyExpertiseClaim"] as const,
|
||||
['ThirdPartyExpertiseClaim', 'CarBodyExpertiseClaim'] as const,
|
||||
) {
|
||||
@ApiPropertyOptional({
|
||||
enum: [RoleEnum.FILE_MAKER],
|
||||
@@ -162,7 +162,7 @@ export class CreateFileMakerByInsurerDto extends OmitType(
|
||||
|
||||
export class CreateFileReviewerByInsurerDto extends OmitType(
|
||||
CreateInsurerExpertDto,
|
||||
["ThirdPartyClaimExpertId", "CarBodyClaimExpertId"] as const,
|
||||
['ThirdPartyClaimExpertId', 'CarBodyClaimExpertId'] as const,
|
||||
) {
|
||||
@ApiPropertyOptional({
|
||||
enum: [RoleEnum.FILE_REVIEWER],
|
||||
|
||||
Reference in New Issue
Block a user