Applicants: 1→N contact methods with types (phone/email/Instagram/Telegram/Bale/site)
- ContactMethod entity (Type + Value + SortOrder) 1→N on TalentListing (+ migration). - Parser extracts ALL contacts: multiple phones + landlines, email, and socials (Instagram/Telegram/Bale/WhatsApp/website) via URLs and Persian keyword cues; primary Phone kept for cards. - ContactInfo helper: per-type label/icon/clickable href (tel:/mailto:/t.me/…). - Ingestion attaches contacts to each (fanned-out) talent listing; manual Review re-parses to attach them + the admin-typed phone. - Talent details renders the full contact list as buttons; falls back to the single phone, then the Divar source link. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace JobsMedical.Web.Models;
|
||||
|
||||
/// <summary>
|
||||
/// One contact channel for an applicant («آماده به کار») listing. 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.).
|
||||
/// </summary>
|
||||
public class ContactMethod
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public int TalentListingId { get; set; }
|
||||
public TalentListing TalentListing { get; set; } = null!;
|
||||
|
||||
public ContactType Type { get; set; }
|
||||
|
||||
[Required, MaxLength(250)]
|
||||
public string Value { get; set; } = "";
|
||||
|
||||
public int SortOrder { get; set; }
|
||||
}
|
||||
@@ -104,6 +104,20 @@ public enum IngestionMode
|
||||
Automatic = 1 // موارد تأییدشده (طبق آستانه/هوش مصنوعی) خودکار منتشر میشوند
|
||||
}
|
||||
|
||||
/// <summary>A way to reach an applicant («آماده به کار»). One listing can have several.</summary>
|
||||
public enum ContactType
|
||||
{
|
||||
Mobile = 0, // موبایل
|
||||
Phone = 1, // تلفن ثابت
|
||||
Email = 2, // ایمیل
|
||||
Telegram = 3, // تلگرام
|
||||
Bale = 4, // بله
|
||||
WhatsApp = 5, // واتساپ
|
||||
Instagram = 6, // اینستاگرام
|
||||
Website = 7, // وبسایت / لینک
|
||||
Other = 8 // سایر
|
||||
}
|
||||
|
||||
public enum ReportTargetType { Shift = 0, Job = 1, Facility = 2, User = 3 }
|
||||
public enum ReportStatus { Open = 0, Resolved = 1, Dismissed = 2 }
|
||||
|
||||
|
||||
@@ -40,7 +40,10 @@ public class TalentListing
|
||||
public int? SharePercent { get; set; } // درصد/سهم درآمد مدنظر («۵۰٪ تسویه»)
|
||||
|
||||
[MaxLength(30)]
|
||||
public string? Phone { get; set; } // شماره تماس — مهمترین فیلد
|
||||
public string? Phone { get; set; } // primary phone (kept for cards/back-compat)
|
||||
|
||||
/// <summary>All contact channels (phones, email, Instagram, Telegram, Bale, website…).</summary>
|
||||
public ICollection<ContactMethod> Contacts { get; set; } = new List<ContactMethod>();
|
||||
|
||||
[MaxLength(2000)]
|
||||
public string? Description { get; set; }
|
||||
|
||||
Reference in New Issue
Block a user