Initial commit

This commit is contained in:
2026-06-04 06:24:56 +02:00
commit 282f4864c4
111 changed files with 8083 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
namespace MealPlan.Api.DTOs.Recipe;
/// <summary>Category metadata with the number of active recipes it contains.</summary>
public class CategoryCountDto
{
public int Category { get; set; }
public string Name { get; set; } = string.Empty;
public int Count { get; set; }
}

View File

@@ -0,0 +1,33 @@
namespace MealPlan.Api.DTOs.Recipe;
/// <summary>Full recipe detail including ingredients and ordered preparation steps.</summary>
public class RecipeDetailDto
{
public int Id { get; set; }
public string Name { get; set; } = string.Empty;
public int MealCategory { get; set; }
public int? Calories { get; set; }
public decimal? Protein { get; set; }
public decimal? Fat { get; set; }
public decimal? Carbs { get; set; }
public int? PrepTimeMinutes { get; set; }
public List<IngredientDto> Ingredients { get; set; } = new();
public List<RecipeStepDto> Steps { get; set; } = new();
}
public class IngredientDto
{
public int Id { get; set; }
public string Name { get; set; } = string.Empty;
public decimal? AmountGrams { get; set; }
public string? Unit { get; set; }
public int SortOrder { get; set; }
}
public class RecipeStepDto
{
public int Id { get; set; }
public int StepNumber { get; set; }
public string Description { get; set; } = string.Empty;
}

View File

@@ -0,0 +1,11 @@
namespace MealPlan.Api.DTOs.Recipe;
/// <summary>Lightweight recipe projection used by list/grid views.</summary>
public class RecipeListItemDto
{
public int Id { get; set; }
public string Name { get; set; } = string.Empty;
public int MealCategory { get; set; }
public int? Calories { get; set; }
public int? PrepTimeMinutes { get; set; }
}