using System.ComponentModel.DataAnnotations;

namespace JobsMedical.Web.Models;

/// <summary>One ingestion run's outcome — kept so admins see a history of what was crawled,
/// how much was found, queued, published, flagged, etc. (with a per-source breakdown).</summary>
public class IngestionRun
{
    public int Id { get; set; }
    public DateTime RunAt { get; set; } = DateTime.UtcNow;

    public int Fetched { get; set; }       // total items pulled from all sources
    public int Queued { get; set; }        // sent to the review queue
    public int Published { get; set; }     // auto-published
    public int Flagged { get; set; }       // needs-review
    public int Spam { get; set; }          // discarded as spam/irrelevant
    public int Duplicates { get; set; }    // skipped (already seen)

    /// <summary>Human-readable per-source breakdown, e.g. "دیوار: یافت ۱۲…؛ مدجابز: یافت ۴۰…".</summary>
    [MaxLength(2000)] public string? Detail { get; set; }
}
