update
This commit is contained in:
@@ -96,11 +96,10 @@ export class CreateCompanyDto extends PickType(CompleteRegistrationDto, ["phone"
|
||||
@ApiPropertyOptional({ description: " تاریخ پایان قرارداد اجاره در صورتیکه اجاره ای است" })
|
||||
rentEndAt?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsArray()
|
||||
@ValidateNested({ each: true })
|
||||
@ApiPropertyOptional({ description: "تصاویر قرارداد اجاره" })
|
||||
contractImages?: string[];
|
||||
@ApiProperty({ description: " یا سند تصاویر قرارداد اجاره" })
|
||||
contractImages: string[];
|
||||
|
||||
@IsNotEmpty({ message: CompanyMessage.INDUSTRY_ID_REQUIRED })
|
||||
@IsUUID("7", { message: CompanyMessage.INDUSTRY_ID_SHOULD_BE_UUID })
|
||||
|
||||
@@ -418,10 +418,6 @@ export class CompaniesService {
|
||||
if (!createDto.rentEndAt) {
|
||||
throw new BadRequestException(CompanyMessage.RENT_END_IS_REQUIRED)
|
||||
}
|
||||
|
||||
if (!createDto.contractImages?.length) {
|
||||
throw new BadRequestException(CompanyMessage.RENT_CONTRACT_IMAGE_IS_REQUIRED)
|
||||
}
|
||||
}
|
||||
|
||||
const industry = await em.findOne(Industry, { id: createDto.industryId, deletedAt: null });
|
||||
|
||||
Reference in New Issue
Block a user