update: add company services and products
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import { ApiProperty } from "@nestjs/swagger";
|
||||
import { IsArray, IsNotEmpty, IsString, IsUrl } from "class-validator";
|
||||
|
||||
import { CompanyMessage } from "../../../common/enums/message.enum";
|
||||
|
||||
export class CreateCompanyServiceDto {
|
||||
@IsNotEmpty({ message: CompanyMessage.SERVICE_TITLE_REQUIRED })
|
||||
@IsString({ message: CompanyMessage.SERVICE_TITLE_MUST_BE_STRING })
|
||||
@ApiProperty({ description: "عنوان خدمت", example: "خدمت نمونه" })
|
||||
title: string;
|
||||
|
||||
@IsNotEmpty({ message: CompanyMessage.SERVICE_IMAGES_REQUIRED })
|
||||
@IsArray({ message: CompanyMessage.SERVICE_IMAGES_MUST_BE_ARRAY })
|
||||
@IsUrl({ protocols: ["http", "https"] }, { each: true, message: CompanyMessage.SERVICE_IMAGES_MUST_BE_URL })
|
||||
@ApiProperty({ description: "تصاویر خدمت", example: ["https://example.com/image1.jpg", "https://example.com/image2.jpg"] })
|
||||
imagesUrl: string[];
|
||||
}
|
||||
Reference in New Issue
Block a user