Correct Models
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
public class Category
|
public class Category
|
||||||
{
|
{
|
||||||
public Guid Id { get; set; }
|
public Guid Id { get; set; }
|
||||||
public string? Name { get; set; }
|
public string Name { get; set; }
|
||||||
public virtual ICollection<Recipe> Recipes { get; set; } = new List<Recipe>();
|
public virtual ICollection<Recipe> Recipes { get; set; } = new List<Recipe>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,25 +1,24 @@
|
|||||||
namespace Francesco.Recipes.World.Models.BackendModels.Recipe
|
namespace Francesco.Recipes.World.Models.BackendModels.Recipe;
|
||||||
{
|
|
||||||
using Francesco.Recipes.World.Models.BackendModels.Category;
|
|
||||||
using Francesco.Recipes.World.Models.BackendModels.Favorit;
|
|
||||||
using Francesco.Recipes.World.Models.BackendModels.Instruction;
|
|
||||||
using Francesco.Recipes.World.Models.BackendModels.MediaFile;
|
|
||||||
using Francesco.Recipes.World.Models.BackendModels.RecipeIngredient;
|
|
||||||
|
|
||||||
public class Recipe : ITimeStampedEntity
|
using Francesco.Recipes.World.Models.BackendModels.Favorit;
|
||||||
{
|
using Francesco.Recipes.World.Models.BackendModels.Instruction;
|
||||||
public Guid Id { get; set; }
|
using Francesco.Recipes.World.Models.BackendModels.MediaFile;
|
||||||
public string Name { get; set; }
|
using Francesco.Recipes.World.Models.BackendModels.RecipeIngredient;
|
||||||
public string? Description { get; set; }
|
|
||||||
public Difficulty Difficulty { get; set; }
|
public class Recipe : ITimeStampedEntity
|
||||||
public int Servings { get; set; }
|
{
|
||||||
public TimeSpan PreparationTime { get; set; }
|
public Guid Id { get; set; }
|
||||||
public TimeSpan CookingTime { get; set; }
|
public string Name { get; set; }
|
||||||
public bool IsFavorite { get; set; }
|
public string? Description { get; set; }
|
||||||
public DateTime CreatedAt { get; set; }
|
public Difficulty Difficulty { get; set; }
|
||||||
public DateTime? ModifiedAt { get; set; }
|
public int Servings { get; set; }
|
||||||
public virtual ICollection<RecipeIngredient> RecipeIngredients { get; set; } = new List<RecipeIngredient>();
|
public TimeSpan PreparationTime { get; set; }
|
||||||
public virtual ICollection<Instruction> Instructions { get; set; } = new List<Instruction>();
|
public TimeSpan CookingTime { get; set; }
|
||||||
public virtual ICollection<MediaFile> MediaFiles { get; set; } = new List<MediaFile>();
|
public bool IsFavorite { get; set; }
|
||||||
public virtual Favorit Favorit { get; set; } = new();
|
public DateTime CreatedAt { get; set; }
|
||||||
}
|
public DateTime? ModifiedAt { get; set; }
|
||||||
|
public virtual ICollection<RecipeIngredient> RecipeIngredients { get; set; } = new List<RecipeIngredient>();
|
||||||
|
public virtual ICollection<Instruction> Instructions { get; set; } = new List<Instruction>();
|
||||||
|
public virtual ICollection<MediaFile> MediaFiles { get; set; } = new List<MediaFile>();
|
||||||
|
public virtual Favorit Favorit { get; set; } = new();
|
||||||
|
}
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ namespace Francesco.Recipes.World.Models.BackendModels.Unit
|
|||||||
public class Unit
|
public class Unit
|
||||||
{
|
{
|
||||||
public Guid Id{ get; set; }
|
public Guid Id{ get; set; }
|
||||||
public string? Name { get; set; }
|
public string Name { get; set; }
|
||||||
public string? Symbol { get; set; }
|
public string Symbol { get; set; }
|
||||||
public virtual ICollection<RecipeIngredient> RecipeIngredient { get; set; } = new List<RecipeIngredient>();
|
public virtual ICollection<RecipeIngredient> RecipeIngredient { get; set; } = new List<RecipeIngredient>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user