using ERPCore.Domain.Enums;

namespace ERPCore.Domain.Entities;

/// <summary>
/// Purchase requisition header (FR-PROC-01). <see cref="RequestedBy"/> is the audit
/// actor from the token (never the body). Model: docs/10 Part C.2.
/// </summary>
public class Requisition
{
    public int RequisitionId { get; set; }
    public string DocNo { get; set; } = string.Empty;

    public int RequestedBy { get; set; }
    public User? Requester { get; set; }

    public RequisitionStatus Status { get; set; } = RequisitionStatus.Draft;
    public DateTime CreatedAt { get; set; }

    public ICollection<RequisitionLine> Lines { get; set; } = new List<RequisitionLine>();
}
