2019-06-17 00:34:54 +01:00
|
|
|
using System.Collections.Generic;
|
2019-06-17 00:28:17 +01:00
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
|
|
|
|
|
|
namespace Cicm.Database.Models
|
|
|
|
|
{
|
|
|
|
|
public class DocumentPerson : BaseModel<int>
|
|
|
|
|
{
|
|
|
|
|
[Required]
|
|
|
|
|
public string Name { get; set; }
|
|
|
|
|
[Required]
|
|
|
|
|
public string Surname { get; set; }
|
|
|
|
|
public int? PersonId { get; set; }
|
|
|
|
|
|
2019-06-17 00:34:54 +01:00
|
|
|
public virtual Person Person { get; set; }
|
|
|
|
|
public virtual ICollection<PeopleByDocument> Documents { get; set; }
|
2019-06-17 03:02:47 +01:00
|
|
|
public virtual ICollection<PeopleByBook> Books { get; set; }
|
2019-06-17 00:28:17 +01:00
|
|
|
|
|
|
|
|
[NotMapped]
|
|
|
|
|
public string FullName => $"{Name} {Surname}";
|
|
|
|
|
}
|
|
|
|
|
}
|