using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.ComponentModel.DataAnnotations; using System.Web.Mvc; using System.ComponentModel.DataAnnotations.Schema; namespace HealthchoiceMVC.Models { public class Person { [Key] public int PersonId { get; set; } [Display(Name = "Title")] public int? TitleId { get; set; } [Required] [Display(Name = "First Name")] [MaxLength(150)] public string FirstName { get; set; } [Display(Name = "Middle Names")] [MaxLength(250)] public string MiddleName { get; set; } = ""; [Required] [Display(Name = "Last Name")] [MaxLength(150)] public string LastName { get; set; } [Display(Name = "Date of birth")] [DataType(DataType.DateTime)] [DisplayFormat(DataFormatString = "{0:dd/mm/yyyy}", ApplyFormatInEditMode = true)] public DateTime DateofBirth { get; set; } [Display(Name = "ID Type")] public int? IDTypeId { get; set; } = 3; [Required] [Display(Name = "ID Number")] [MinLength(6)] public string IdentityNumber { get; set; } = ""; [Required] [Display(Name = "Gender")] [StringLength(1)] public string Gender { get; set; } [Display(Name = "Created")] [DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:dd/MM/yyyy}")] public DateTime? CreatedDate { get; set; } //[Required] [Display(Name = "LinkedLogin")] [StringLength(60)] public string LinkedLogin { get; set; } = ""; public virtual ICollection PersonTypes { get; set; } public virtual ICollection PersonContacts { get; set; } } }