namespace ERPCore.Domain.Entities;

/// <summary>
/// Per employee/type/year leave entitlement (FR-HR-LV-03). Unique on
/// (EmployeeId, LeaveTypeId, Year). RemainingDays is a computed projection, not
/// stored. Model: docs/12-BACKEND-HRM.md Part C.5.
/// </summary>
public class LeaveBalance
{
    public int LeaveBalanceId { get; set; }
    public int EmployeeId { get; set; }
    public Employee? Employee { get; set; }
    public int LeaveTypeId { get; set; }
    public LeaveType? LeaveType { get; set; }
    public int Year { get; set; }

    public decimal EntitledDays { get; set; }
    public decimal TakenDays { get; set; }
    public decimal CarriedForwardDays { get; set; }
    public decimal AdjustmentDays { get; set; }

    public uint RowVersion { get; set; }
    public DateTime? UpdatedAt { get; set; }
}
