using Shared.Data.Entities;

namespace CvSearch.Data.Entities;

public sealed class JobSearchSessionEntity : BaseEntity
{
    public string TokenId { get; set; } = string.Empty;
    public string CvDocumentId { get; set; } = string.Empty;
    public string Email { get; set; } = string.Empty;
    public string Status { get; set; } = JobSearchStatus.Pending;
    public string Keywords { get; set; } = string.Empty;
    public string? Location { get; set; }
    /// <summary>Client IP address captured when the user clicked the one-time job-search link. Null for sessions created before this field was added.</summary>
    public string? ClientIpAddress { get; set; }
    public string? ProviderConfigJson { get; set; }
    public string Language { get; set; } = "en";
}

public static class JobSearchStatus
{
    public const string Pending = "Pending";
    public const string Processing = "Processing";
    public const string Done = "Done";
    public const string Failed = "Failed";
}
