Rebrand database project.

This commit is contained in:
2020-02-10 02:23:32 +00:00
parent 091a27c3d9
commit 6e1ba53f3b
198 changed files with 5 additions and 4 deletions

View File

@@ -0,0 +1,29 @@
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Marechai.Database.Models
{
public class DocumentPerson : BaseModel<int>
{
[Required]
public string Name { get; set; }
[Required]
public string Surname { get; set; }
public int? PersonId { get; set; }
public string Alias { get; set; }
[DisplayName("Name to be displayed")]
public string DisplayName { get; set; }
[NotMapped]
[DisplayName("Name")]
public string FullName => DisplayName ?? Alias ?? $"{Name} {Surname}";
[DisplayName("Linked person")]
public virtual Person Person { get; set; }
public virtual ICollection<PeopleByDocument> Documents { get; set; }
public virtual ICollection<PeopleByBook> Books { get; set; }
public virtual ICollection<PeopleByMagazine> Magazines { get; set; }
}
}