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 PersonContact { [Key] public int PersonContactId { get; set; } [Required] [Display(Name = "Person")] public int PersonId { get; set; } [Required] [Display(Name = "Contact Type")] public int ContactTypeId { get; set; } [Required] [Display(Name = "Contact Class")] public int ContactClassId { get; set; } [Display(Name = "Alternative Class")] [MaxLength(50)] public string AlternativeClass { get; set; } = ""; [Required] [Display(Name = "Contact Value")] [MaxLength(250)] public string ContactValue { get; set; } = ""; [Required] [Display(Name = "Contact Validated")] public bool IsValidated { get; set; } = false; [Display(Name = "Contact Validated Date")] public DateTime DateValidated { get; set; } = DateTime.Now.AddYears(-100); [ForeignKey("PersonId")] public virtual Person Person { get; set; } [ForeignKey("ContactTypeId")] public virtual ContactType ContactType { get; set; } [ForeignKey("ContactClassId")] public virtual ContactClass ContactClass { get; set; } } }