2026-06-03 01:43:55 +03:30
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
|
|
|
|
|
|
|
|
namespace JobsMedical.Web.Models;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Staging area for shift listings aggregated from Telegram / Bale / Divar channels.
|
|
|
|
|
|
/// An admin reviews and normalizes these into real <see cref="Shift"/> records.
|
|
|
|
|
|
/// This is how we beat the cold-start problem.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public class RawListing
|
|
|
|
|
|
{
|
|
|
|
|
|
public int Id { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
[MaxLength(200)]
|
|
|
|
|
|
public string SourceChannel { get; set; } = ""; // نام کانال/منبع
|
|
|
|
|
|
|
|
|
|
|
|
[Required]
|
|
|
|
|
|
public string RawText { get; set; } = ""; // متن خام آگهی
|
|
|
|
|
|
|
|
|
|
|
|
public string? ParsedJson { get; set; } // نتیجهی تجزیهی خودکار (در صورت وجود)
|
|
|
|
|
|
|
|
|
|
|
|
public RawListingStatus Status { get; set; } = RawListingStatus.New;
|
|
|
|
|
|
|
|
|
|
|
|
public int? LinkedShiftId { get; set; } // شیفت ساختهشده از این آگهی
|
|
|
|
|
|
public Shift? LinkedShift { get; set; }
|
|
|
|
|
|
|
2026-06-08 08:01:12 +03:30
|
|
|
|
public int? LinkedTalentId { get; set; } // آگهی «آماده به کار» ساختهشده از این متن
|
2026-06-09 21:38:55 +03:30
|
|
|
|
public TalentListing? LinkedTalent { get; set; }
|
2026-06-08 08:01:12 +03:30
|
|
|
|
|
2026-06-03 01:43:55 +03:30
|
|
|
|
[MaxLength(500)]
|
|
|
|
|
|
public string? SourceUrl { get; set; }
|
|
|
|
|
|
|
2026-06-09 21:38:55 +03:30
|
|
|
|
/// <summary>Approximate coordinates harvested from the source (e.g. Divar's fuzzed map center).
|
|
|
|
|
|
/// Carried through the review queue so a manual publish can still place the facility on the map.</summary>
|
|
|
|
|
|
public double? Lat { get; set; }
|
|
|
|
|
|
public double? Lng { get; set; }
|
|
|
|
|
|
|
2026-06-03 08:18:19 +03:30
|
|
|
|
/// <summary>SHA-256 of the normalized text — used to dedupe across ingestion runs.</summary>
|
|
|
|
|
|
[MaxLength(64)]
|
|
|
|
|
|
public string? ContentHash { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>Parser+validator confidence 0–100 (how complete/usable the listing looks).</summary>
|
|
|
|
|
|
public int Confidence { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>Human-readable validation findings (missing fields, spam flags, etc.).</summary>
|
|
|
|
|
|
[MaxLength(1000)]
|
|
|
|
|
|
public string? ValidationNotes { get; set; }
|
|
|
|
|
|
|
2026-06-03 01:43:55 +03:30
|
|
|
|
public DateTime FetchedAt { get; set; } = DateTime.UtcNow;
|
|
|
|
|
|
}
|