Implement Recipe, Planning, Shopping, Pantry, and Admin domains
Outside-in TDD for all 5 remaining domains (128 tests total): - Recipe: CRUD, ingredients autocomplete/patch, tags, categories (27 tests) - Planning: week plans, slots, confirm, suggestions, variety score, cooking logs (24 tests) - Shopping: generate from plan, publish, check/add/remove items (15 tests) - Pantry: CRUD with expiry sorting (11 tests) - Admin: user management, password reset, audit logging (13 tests) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
package com.recipeapp.planning.dto;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.UUID;
|
||||
|
||||
public record CookingLogResponse(UUID id, UUID recipeId, String recipeName, LocalDate cookedOn, UUID cookedBy) {}
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.recipeapp.planning.dto;
|
||||
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import java.time.LocalDate;
|
||||
import java.util.UUID;
|
||||
|
||||
public record CreateCookingLogRequest(@NotNull UUID recipeId, LocalDate cookedOn) {}
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.recipeapp.planning.dto;
|
||||
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import java.time.LocalDate;
|
||||
import java.util.UUID;
|
||||
|
||||
public record CreateSlotRequest(@NotNull LocalDate slotDate, @NotNull UUID recipeId) {}
|
||||
@@ -0,0 +1,6 @@
|
||||
package com.recipeapp.planning.dto;
|
||||
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import java.time.LocalDate;
|
||||
|
||||
public record CreateWeekPlanRequest(@NotNull LocalDate weekStart) {}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.recipeapp.planning.dto;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.UUID;
|
||||
|
||||
public record SlotResponse(
|
||||
UUID id,
|
||||
LocalDate slotDate,
|
||||
SlotRecipe recipe
|
||||
) {
|
||||
public record SlotRecipe(UUID id, String name, String effort, short cookTimeMin, String heroImageUrl) {}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.recipeapp.planning.dto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public record SuggestionResponse(List<SuggestionItem> suggestions) {
|
||||
|
||||
public record SuggestionItem(
|
||||
SlotResponse.SlotRecipe recipe,
|
||||
List<String> fitReasons,
|
||||
List<String> warnings
|
||||
) {}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package com.recipeapp.planning.dto;
|
||||
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import java.util.UUID;
|
||||
|
||||
public record UpdateSlotRequest(@NotNull UUID recipeId) {}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.recipeapp.planning.dto;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public record VarietyScoreResponse(
|
||||
double score,
|
||||
List<IngredientOverlap> ingredientOverlaps,
|
||||
List<String> proteinRepeats,
|
||||
Map<String, Integer> effortBalance
|
||||
) {
|
||||
public record IngredientOverlap(String ingredientName, List<LocalDate> days) {}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.recipeapp.planning.dto;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
public record WeekPlanResponse(
|
||||
UUID id,
|
||||
LocalDate weekStart,
|
||||
String status,
|
||||
Instant confirmedAt,
|
||||
List<SlotResponse> slots
|
||||
) {}
|
||||
Reference in New Issue
Block a user