using System; using System.ComponentModel.DataAnnotations.Schema; namespace Data.SeaHavenIndustries { public class Contacts : FullAuditEntity { public string? Title { get; set; } public string? Owner { get; set; } public string? FirstName { get; set; } public string? MiddleName { get; set; } public string? LastName { get; set; } public string? ContactType { get; set; } public string? PhoneNumber { get; set; } public string? Email { get; set; } // Address fields public string? Address1 { get; set; } public string? Address2 { get; set; } public string? City { get; set; } public string? State { get; set; } public string? Zip { get; set; } // Social Media public string? FacebookUrl { get; set; } public string? LinkedInUrl { get; set; } public string? TwitterUrl { get; set; } // Foreign Keys public int? LocationId { get; set; } public int? AccountId { get; set; } // SH-138: dense zero-based display order for site-managed contacts public int? SiteContactOrder { get; set; } // Navigation Properties [ForeignKey(nameof(LocationId))] public Locations? Location { get; set; } [ForeignKey(nameof(AccountId))] public Accounts? Account { get; set; } public ICollection? WorkOrderContacts { get; set; } // Computed property for full name [NotMapped] public string? FullName => $"{FirstName} {MiddleName} {LastName}".Trim(); } }