mirror of
https://github.com/Sea-Haven-Industries/shoc-backend.git
synced 2026-09-30 09:33:13 +00:00
49 lines
1.6 KiB
C#
49 lines
1.6 KiB
C#
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>? WorkOrderContacts { get; set; }
|
|
|
|
// Computed property for full name
|
|
[NotMapped]
|
|
public string? FullName => $"{FirstName} {MiddleName} {LastName}".Trim();
|
|
}
|
|
}
|