using ERPCore.Domain.Enums;

namespace ERPCore.Domain.Entities;

/// <summary>Leave type master (FR-HR-LV-01). Model: docs/12-BACKEND-HRM.md Part C.5.</summary>
public class LeaveType
{
    public int LeaveTypeId { get; set; }
    public string Code { get; set; } = string.Empty;
    public string Name { get; set; } = string.Empty;
    public bool IsPaid { get; set; } = true;
    /// <summary>Feeds Payroll's No-Pay deduction when true (docs/12-BACKEND-HRM.md §6).</summary>
    public bool CountsAsNoPay { get; set; }
    public decimal AccrualPerYear { get; set; }
    public bool CarryForwardAllowed { get; set; }
    public int? MaxCarryForwardDays { get; set; }
    public bool RequiresApproval { get; set; } = true;
    public EntityStatus Status { get; set; } = EntityStatus.Active;

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