namespace JobsMedical.Web.Models;

/// <summary>
/// What a visitor says they want — the explicit signal for the recommendation engine.
/// Stored per visitor (works pre-login); merges to the user account on login.
/// </summary>
public class UserPreferences
{
    public int Id { get; set; }

    public string VisitorId { get; set; } = "";
    public Visitor Visitor { get; set; } = null!;

    public int? RoleId { get; set; }                  // نقش مورد علاقه
    public Role? Role { get; set; }

    public int? CityId { get; set; }                  // شهر مورد علاقه
    public City? City { get; set; }

    public ShiftType? PreferredShiftType { get; set; } // نوع شیفت ترجیحی
    public long? MinPay { get; set; }                  // حداقل حقوق مورد انتظار (تومان)
    public Gender Gender { get; set; } = Gender.Any;   // جنسیت کارجو (برای تطبیق با نیاز آگهی)

    public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;

    public bool HasAny =>
        RoleId is not null || CityId is not null || PreferredShiftType is not null || MinPay is not null;
}
