namespace CashLineERP.Domain.Workflow;

public sealed class WorkflowRule
{
    public long Id { get; private set; }

    public string ModuleCode { get; private set; } = string.Empty;

    public string DocumentType { get; private set; } = string.Empty;

    public string ActionCode { get; private set; } = string.Empty;

    public string? MakerRoleCode { get; private set; }

    public string? CheckerRoleCode { get; private set; }

    public decimal? ThresholdAmount { get; private set; }

    public string? CurrencyCode { get; private set; }

    public long? BranchId { get; private set; }

    public bool IsActive { get; private set; } = true;

    public WorkflowRule(
        long id,
        string moduleCode,
        string documentType,
        string actionCode,
        string? makerRoleCode = null,
        string? checkerRoleCode = null,
        decimal? thresholdAmount = null,
        string? currencyCode = null,
        long? branchId = null)
    {
        Id = id;
        ModuleCode = moduleCode;
        DocumentType = documentType;
        ActionCode = actionCode;
        MakerRoleCode = makerRoleCode;
        CheckerRoleCode = checkerRoleCode;
        ThresholdAmount = thresholdAmount;
        CurrencyCode = currencyCode;
        BranchId = branchId;
    }

    private WorkflowRule()
    {
    }
}
