Merge develop into feature/Show-ShoppingList-Of-Active-RecipeCard
This commit is contained in:
@@ -34,7 +34,7 @@ public class Recipe : ITimeStampedEntity
|
||||
|
||||
public virtual ICollection<MediaFile> MediaFiles { get; set; } = new List<MediaFile>();
|
||||
|
||||
public virtual Favorit Favorit { get; set; } = new ();
|
||||
public virtual Favorit Favorite { get; set; } = new ();
|
||||
|
||||
public virtual Category Category { get; set; } = new ();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
using Francesco.Recipes.World.Constants;
|
||||
using Francesco.Recipes.World.Models.BackendModels.Recipe;
|
||||
|
||||
namespace Francesco.Recipes.World.Models
|
||||
{
|
||||
public class FavoriteViewModel
|
||||
{
|
||||
public IEnumerable<Recipe> FavoriteRecipes { get; set; } = new List<Recipe>();
|
||||
|
||||
public string SortOrder { get; set; } = SortOrders.Newest;
|
||||
|
||||
public bool HasFavorites => FavoriteRecipes.Any();
|
||||
|
||||
public string SortOrderDisplayText => SortOrder == SortOrders.Oldest ? "Älteste Favorits" : "Neueste Favorits";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
namespace Francesco.Recipes.World.Models
|
||||
{
|
||||
public class SearchViewModel
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
public string? Description { get; set; }
|
||||
|
||||
public bool IsFavorite { get; set; }
|
||||
|
||||
public byte[]? ImageData { get; set; }
|
||||
|
||||
public string? MimeType { get; set; }
|
||||
|
||||
public List<string> Ingredients { get; set; } = new ();
|
||||
|
||||
public TimeSpan TotalTime { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user