Entities vereinfacht (kein Entity Developer mehr)

This commit is contained in:
Andre Beging
2022-05-21 13:56:21 +02:00
parent 21f4906277
commit f23f225098
36 changed files with 416 additions and 2255 deletions

View File

@@ -1,8 +1,51 @@
namespace FoodsharingSiegen.Contracts.Entity
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace FoodsharingSiegen.Contracts.Entity
{
public partial class Prospect
/// <summary>
/// The prospect class (a. beging, 21.05.2022)
/// </summary>
public class Prospect
{
public bool Complete => Interactions?.Any(x => x.Type == InteractionType.Complete) == true;
#region Public Properties
/// <summary>
/// Gets the value of the complete (ab)
/// </summary>
[NotMapped] public bool Complete => Interactions?.Any(x => x.Type == InteractionType.Complete) == true;
/// <summary>
/// Gets or sets the value of the created (ab)
/// </summary>
public DateTime Created { get; set; }
/// <summary>
/// Gets or sets the value of the fs id (ab)
/// </summary>
public int FsId { get; set; }
/// <summary>
/// Gets or sets the value of the id (ab)
/// </summary>
[Key] public Guid Id { get; set; }
/// <summary>
/// Gets or sets the value of the interactions (ab)
/// </summary>
public IList<Interaction> Interactions { get; set; }
/// <summary>
/// Gets or sets the value of the memo (ab)
/// </summary>
public string? Memo { get; set; }
/// <summary>
/// Gets or sets the value of the name (ab)
/// </summary>
public string Name { get; set; }
#endregion
}
}