Reapply "add CategoryController with endpoints"

This reverts commit 928743303c.
This commit is contained in:
franc
2025-04-08 15:52:32 +02:00
parent 928743303c
commit d248ccb1db
24 changed files with 1535 additions and 142 deletions
@@ -1,15 +1,22 @@
namespace Francesco.Recipes.World.Models.BackendModels.Recipe
using System.ComponentModel.DataAnnotations;
namespace Francesco.Recipes.World.Models.BackendModels.Recipe
{
public enum Difficulty
{
[Display(Name = "Sehr einfach")]
VeryEasy = 0,
[Display(Name = "Einfach")]
Easy = 1,
[Display(Name = "Mittel")]
Medium = 2,
[Display(Name = "Schwer")]
Hard = 3,
[Display(Name = "Experte")]
Expert = 4,
}
}
@@ -1,14 +1,16 @@
namespace Francesco.Recipes.World.Models.BackendModels.IngredientShoppingList
{
using Francesco.Recipes.World.Models.BackendModels.RecipeIngredient;
using Francesco.Recipes.World.Models.BackendModels.Shoppinglist;
using Francesco.Recipes.World.Models.BackendModels.RecipeShoppingList;
public class RecipeIngredientShoppingList
{
public Guid Id { get; set; }
public virtual ShoppingList ShoppingList { get; set; } = new ();
public virtual RecipeShoppingList RecipeShoppingList { get; set; } = new ();
public virtual RecipeIngredient RecipeIngredient { get; set; } = new ();
public bool IsChecked { get; set; } = false;
}
}
@@ -0,0 +1,17 @@
namespace Francesco.Recipes.World.Models.BackendModels.RecipeShoppingList
{
using Francesco.Recipes.World.Models.BackendModels.IngredientShoppingList;
using Francesco.Recipes.World.Models.BackendModels.Recipe;
using Francesco.Recipes.World.Models.BackendModels.Shoppinglist;
public class RecipeShoppingList
{
public Guid Id { get; set; }
public virtual ShoppingList ShoppingList { get; set; } = new ShoppingList();
public virtual Recipe Recipe { get; set; } = new ();
public virtual ICollection<RecipeIngredientShoppingList> SelectedIngredients { get; set; } = new List<RecipeIngredientShoppingList>();
}
}
@@ -1,6 +1,6 @@
namespace Francesco.Recipes.World.Models.BackendModels.Shoppinglist
{
using Francesco.Recipes.World.Models.BackendModels.IngredientShoppingList;
using Francesco.Recipes.World.Models.BackendModels.RecipeShoppingList;
public class ShoppingList : ITimeStampedEntity
{
@@ -10,6 +10,6 @@
public DateTime? ModifiedAt { get; set; }
public virtual ICollection<RecipeIngredientShoppingList> RecipeIngredientShoppingLists { get; set; } = new List<RecipeIngredientShoppingList>();
public virtual ICollection<RecipeShoppingList> RecipeShoppingList { get; set; } = new List<RecipeShoppingList>();
}
}