using SolutionErp.Domain.Common;

namespace SolutionErp.Domain.Budgets;

// 2-stage department approval cho Budget workflow (Phase 9 — Migration 16).
// Mirror schema ContractDepartmentApproval / PurchaseEvaluationDepartmentApproval.
public class BudgetDepartmentApproval : AuditableEntity
{
    public Guid BudgetId { get; set; }
    public int PhaseAtApproval { get; set; }              // snapshot BudgetPhase int
    public Guid DepartmentId { get; set; }
    public ApprovalStage Stage { get; set; }               // 1=Review (NV), 2=Confirm (TPB)
    public Guid ApproverUserId { get; set; }
    public string? ApproverRoleSnapshot { get; set; }
    public string? Comment { get; set; }
    public DateTime ApprovedAt { get; set; }
    public bool IsBypassed { get; set; }

    public Budget? Budget { get; set; }
}
