using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations.Schema; using System.Linq; using System.Text; using System.Threading.Tasks; using gehGassiApp.Domain.Advertisements; using gehGassiApp.Domain.Base; using gehGassiApp.Domain.Dogs; using gehGassiApp.Domain.Listings; using gehGassiApp.Domain.Lookup; namespace gehGassiApp.Domain.Favourites { /// /// Favoriten für Listendarstellung /// public class FavouriteListItem : SyncEntity { /// /// Benutrzer der den Favoriten angelegt hat /// public string AppUserId { get; set; } /// /// Id des verknüpften Objektes /// public string Key { get; set; } /// /// Typ des Objektes das verbunden wurde /// public string Table { get; set; } /// /// Wann erstellt? /// public DateTimeOffset Created { get; set; } /// /// Gibt an ob die Resource am Server nicht mehr verfügbar ist /// public bool NotAvailable { get; set; } /// /// Werbung, wenn entsprechender Typ /// public Advertisement Advertisement { get; set; } /// /// PArtner, wenn entsprechender Typ /// public Listing Listing { get; set; } /// /// Hund, wenn entsprechender Typ /// public Dog Dog { get; set; } /// /// Walker, wenn entsprechender Typ /// public DogWalkerLookup DogWalker { get; set; } #region Erweiterung Blockier- und Sperrinfo /// /// Hundebesitzer ist blockiert /// [NotMapped] public bool Blocked { get; set; } /// /// Hundebesitzer ist gesperrt /// [NotMapped] public bool Locked { get; set; } /// /// Hundebesitzer blockiert oder gesperrt? /// [NotMapped] public bool BlockedOrLocked => Blocked || Locked; #endregion /// /// Erstellt eine Instanz /// public FavouriteListItem() { Advertisement = null; Listing = null; Dog = null; DogWalker = null; } } }