Recipe-app main

This commit is contained in:
2026-04-09 09:14:39 +02:00
commit 962f4e4be5
10015 changed files with 2445177 additions and 0 deletions
@@ -0,0 +1,28 @@
import {
IsArray,
IsOptional,
IsString,
ValidateNested,
ArrayMinSize,
} from 'class-validator';
import { Type } from 'class-transformer';
import { CreateRecipeIngredientDto } from './create-recipe-ingredient.dto';
export class CreateRecipeDto {
@IsString()
name!: string;
@IsOptional()
@IsString()
description?: string;
@IsOptional()
@IsString()
instructions?: string;
@IsArray()
@ArrayMinSize(1)
@ValidateNested({ each: true })
@Type(() => CreateRecipeIngredientDto)
ingredients!: CreateRecipeIngredientDto[];
}