using System.ComponentModel.DataAnnotations;
namespace JobsMedical.Web.Models;
///
/// A saved job alert ("هشدار شغلی") — the user describes what they're after (kind, role, city,
/// shift type, employment type, minimum pay). When an employer publishes a matching shift/job,
/// the matching engine notifies the owner. A user can keep several alerts; each can be paused.
///
public class JobAlert
{
public int Id { get; set; }
public int UserId { get; set; }
public User User { get; set; } = null!;
[MaxLength(120)] public string? Label { get; set; } // optional friendly name
public AlertScope Scope { get; set; } = AlertScope.Any;
public int? RoleId { get; set; } // null = any role
public Role? Role { get; set; }
public int? CityId { get; set; } // null = any city
public City? City { get; set; }
public int? DistrictId { get; set; } // null = any district
public ShiftType? ShiftType { get; set; } // for shifts; null = any
public EmploymentType? EmploymentType { get; set; } // for jobs; null = any
/// Minimum acceptable pay (تومان): per-shift amount for shifts, monthly salary for jobs.
public long? MinPay { get; set; }
public bool IsActive { get; set; } = true;
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
}