using System.ComponentModel.DataAnnotations; namespace JobsMedical.Web.Models; /// /// One contact channel for a listing — an applicant («آماده به کار»), a , or a /// . A listing can carry several — e.g. three phones + an email + an /// Instagram page. holds the raw handle / number / address; /// decides how it's linked (tel:, mailto:, t.me/…, etc.). Exactly one owner FK is set. /// public class ContactMethod { public int Id { get; set; } // Owner — exactly one of these is non-null. public int? TalentListingId { get; set; } public TalentListing? TalentListing { get; set; } public int? ShiftId { get; set; } public Shift? Shift { get; set; } public int? JobOpeningId { get; set; } public JobOpening? JobOpening { get; set; } public ContactType Type { get; set; } [Required, MaxLength(250)] public string Value { get; set; } = ""; public int SortOrder { get; set; } }