هذا الالتزام موجود في:
2026-04-20 15:12:16 +03:00
التزام 28f7241bcd
172 ملفات معدلة مع 21907 إضافات و0 حذوفات

عرض الملف

@@ -0,0 +1,50 @@
import { Type } from 'class-transformer';
import {
ArrayMaxSize,
IsArray,
IsBoolean,
IsNotEmpty,
IsNumber,
IsOptional,
IsString,
MaxLength,
Min,
} from 'class-validator';
export class CreateInstrumentDto {
@IsString()
@IsNotEmpty()
@MaxLength(120)
title!: string;
@IsOptional()
@IsString()
@MaxLength(2000)
description?: string;
@Type(() => Number)
@IsNumber()
@Min(0)
price!: number;
@IsOptional()
@IsString()
@MaxLength(8)
currency?: string;
@Type(() => Number)
@IsNumber()
@Min(0)
quantity!: number;
@IsOptional()
@IsArray()
@ArrayMaxSize(5)
@IsString({ each: true })
imageUrls?: string[];
@IsOptional()
@Type(() => Boolean)
@IsBoolean()
isActive?: boolean;
}