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:
@@ -285,6 +285,35 @@ namespace JobsMedical.Web.Migrations
|
||||
b.ToTable("Cities");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("JobsMedical.Web.Models.ContactMethod", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("SortOrder")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("TalentListingId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("Type")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("Value")
|
||||
.IsRequired()
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("character varying(250)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("TalentListingId");
|
||||
|
||||
b.ToTable("ContactMethods");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("JobsMedical.Web.Models.District", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
@@ -1218,6 +1247,17 @@ namespace JobsMedical.Web.Migrations
|
||||
b.Navigation("Shift");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("JobsMedical.Web.Models.ContactMethod", b =>
|
||||
{
|
||||
b.HasOne("JobsMedical.Web.Models.TalentListing", "TalentListing")
|
||||
.WithMany("Contacts")
|
||||
.HasForeignKey("TalentListingId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("TalentListing");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("JobsMedical.Web.Models.District", b =>
|
||||
{
|
||||
b.HasOne("JobsMedical.Web.Models.City", "City")
|
||||
@@ -1500,6 +1540,11 @@ namespace JobsMedical.Web.Migrations
|
||||
b.Navigation("Applications");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("JobsMedical.Web.Models.TalentListing", b =>
|
||||
{
|
||||
b.Navigation("Contacts");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("JobsMedical.Web.Models.User", b =>
|
||||
{
|
||||
b.Navigation("Applications");
|
||||
|
||||
Reference in New Issue
Block a user