2026-06-08 11:10:19 +03:30
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
|
|
|
|
|
|
namespace JobsMedical.Web.Models;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2026-06-10 21:28:12 +03:30
|
|
|
/// One contact channel for a listing — an applicant («آماده به کار»), a <see cref="Shift"/>, or a
|
|
|
|
|
/// <see cref="JobOpening"/>. A listing can carry several — e.g. three phones + an email + an
|
|
|
|
|
/// Instagram page. <see cref="Value"/> holds the raw handle / number / address; <see cref="Type"/>
|
|
|
|
|
/// decides how it's linked (tel:, mailto:, t.me/…, etc.). Exactly one owner FK is set.
|
2026-06-08 11:10:19 +03:30
|
|
|
/// </summary>
|
|
|
|
|
public class ContactMethod
|
|
|
|
|
{
|
|
|
|
|
public int Id { get; set; }
|
|
|
|
|
|
2026-06-10 21:28:12 +03:30
|
|
|
// 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; }
|
2026-06-08 11:10:19 +03:30
|
|
|
|
|
|
|
|
public ContactType Type { get; set; }
|
|
|
|
|
|
|
|
|
|
[Required, MaxLength(250)]
|
|
|
|
|
public string Value { get; set; } = "";
|
|
|
|
|
|
|
|
|
|
public int SortOrder { get; set; }
|
|
|
|
|
}
|