chore: company and industy related logix
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { ApiProperty } from "@nestjs/swagger";
|
||||
import { IsArray, IsNotEmpty, IsString, IsUrl } from "class-validator";
|
||||
import { IsNotEmpty, IsString, IsUrl } from "class-validator";
|
||||
|
||||
import { CompanyMessage } from "../../../common/enums/message.enum";
|
||||
|
||||
@@ -10,8 +10,7 @@ export class CreateCompanyProductDto {
|
||||
title: string;
|
||||
|
||||
@IsNotEmpty({ message: CompanyMessage.PRODUCT_IMAGES_REQUIRED })
|
||||
@IsArray({ message: CompanyMessage.PRODUCT_IMAGES_MUST_BE_ARRAY })
|
||||
@IsUrl({ protocols: ["http", "https"] }, { each: true, message: CompanyMessage.PRODUCT_IMAGES_MUST_BE_URL })
|
||||
@ApiProperty({ description: "تصاویر محصول", example: ["https://example.com/image1.jpg", "https://example.com/image2.jpg"] })
|
||||
imagesUrl: string[];
|
||||
@IsUrl({ protocols: ["http", "https"] }, { message: CompanyMessage.PRODUCT_IMAGES_MUST_BE_URL })
|
||||
@ApiProperty({ description: "تصاویر محصول", example: "https://example.com/image1.jpg" })
|
||||
imageUrl: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user