Files
mealprep/backend/src/main/java/com/recipeapp/recipe/dto/RecipeCreateRequest.java
Marcel Raddatz 520dae5adf feat(recipes): add image upload, fix save 500, seed HelloFresh data
- Store hero image as base64 data URI in text column (V023 migration)
- Add file upload UI to RecipeForm with FileReader preview
- Remove isChildFriendly from RecipeCreateRequest (no form field)
- Fix 500 on save: effort values now lowercase, serves/cookTimeMin changed
  from primitive short to nullable Integer to survive omitted fields
- Fix empty categories panel: removed stale tagType=category filter
- Group category tags by type with German headings in recipe form
- Split SuggestionResponse.SuggestionRecipe (no image) from SlotRecipe
- Seed 11 HelloFresh recipes with ingredients, steps and tags (V101)
- Add frontend e2e scaffold, specs and dev yml

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-09 20:23:28 +02:00

33 lines
951 B
Java

package com.recipeapp.recipe.dto;
import jakarta.validation.Valid;
import jakarta.validation.constraints.*;
import java.math.BigDecimal;
import java.util.List;
import java.util.UUID;
public record RecipeCreateRequest(
@NotBlank @Size(max = 200) String name,
Integer serves,
Integer cookTimeMin,
@NotBlank @Pattern(regexp = "easy|medium|hard") String effort,
String heroImageUrl,
@NotEmpty @Valid List<IngredientEntry> ingredients,
@Valid List<StepEntry> steps,
@NotEmpty List<UUID> tagIds
) {
public record IngredientEntry(
UUID ingredientId,
@Size(max = 200) String newIngredientName,
@NotNull @DecimalMin("0.01") BigDecimal quantity,
@NotBlank @Size(max = 20) String unit,
short sortOrder
) {}
public record StepEntry(
@Min(1) short stepNumber,
@NotBlank String instruction
) {}
}