Files
test/src/item/dto/create-item.dto.ts
T
2025-11-06 16:40:32 +03:00

34 lines
432 B
TypeScript

import {
IsNotEmpty,
IsNumber,
IsOptional,
IsString,
IsUUID,
} from 'class-validator';
export class CreateItemDto {
@IsNotEmpty()
@IsString()
name: string;
@IsOptional()
@IsString()
description?: string;
@IsNotEmpty()
@IsNumber()
price: number;
@IsOptional()
@IsString()
image?: string;
@IsOptional()
@IsUUID()
categoryId?: string;
@IsNotEmpty()
@IsUUID()
restaurantId: string;
}