save recipes

This commit is contained in:
Anika Raemer 2025-09-28 12:24:59 +02:00
parent 3a887d8dbb
commit 380eb4cd21
18 changed files with 412 additions and 87 deletions

View file

@ -10,6 +10,6 @@ export class RecipeDto extends AbstractDto {
title!: string;
amount?: number
amountDescription?: string;
instructions?: RecipeInstructionStepDto[];
ingredientGroups?: RecipeIngredientGroupDto[];
instructions!: RecipeInstructionStepDto[];
ingredientGroups!: RecipeIngredientGroupDto[];
}

View file

@ -2,10 +2,10 @@ import { UUID } from "crypto";
import { AbstractDto } from "./AbstractDto.js";
export class RecipeIngredientDto extends AbstractDto{
name?: string;
name!: string;
subtext?: string;
amount?: number;
unit?: string;
sortOrder?: number;
sortOrder!: number;
ingredientGroupId?: UUID;
}

View file

@ -4,7 +4,7 @@ import { RecipeIngredientDto } from "./RecipeIngredientDto.js";
export class RecipeIngredientGroupDto extends AbstractDto{
title?: string;
sortOrder?: string;
sortOrder!: number;
recipeId?: UUID;
ingredients?: RecipeIngredientDto[];
ingredients!: RecipeIngredientDto[];
}

View file

@ -2,7 +2,7 @@ import { UUID } from "crypto";
import { AbstractDto } from "./AbstractDto.js";
export class RecipeInstructionStepDto extends AbstractDto{
text?: string;
sortOrder?: number;
text!: string;
sortOrder!: number;
recipeId?: UUID;
}