using SolutionErp.Domain.Common;

namespace SolutionErp.Domain.Contracts;

// Lịch sử phê duyệt: mỗi lần chuyển phase tạo 1 row.
// ApproverUserId = null nếu là auto-approve do SLA expired.
public class ContractApproval : BaseEntity
{
    public Guid ContractId { get; set; }
    public ContractPhase FromPhase { get; set; }
    public ContractPhase ToPhase { get; set; }
    public Guid? ApproverUserId { get; set; }
    public ApprovalDecision Decision { get; set; }
    public string? Comment { get; set; }
    public DateTime ApprovedAt { get; set; }

    public Contract? Contract { get; set; }
}
