using CashLineERP.Application.IslamicFinance;

namespace CashLineERP.Application.IslamicFinance.ReceivablesFinance;

public interface IReceivablesFinanceRepository
{
    IReadOnlyCollection<IslamicFinanceReceivablesCaseDetailView> GetCases(
        string? statusCode = null,
        long? customerPartyId = null,
        long? partnerLenderId = null);
    IslamicFinanceReceivablesCaseDetailView? GetCase(long receivablesCaseId);
    IslamicFinanceReceivablesCaseDetailView Create(CreateIslamicFinanceReceivablesCaseCommand command);
    IslamicFinanceReceivablesCaseDetailView Submit(long receivablesCaseId, long actorUserId);
    IslamicFinanceReceivablesCaseDetailView Approve(long receivablesCaseId, long actorUserId);
    IslamicFinanceReceivablesCaseDetailView Activate(long receivablesCaseId, long actorUserId);
    IReadOnlyCollection<IslamicFinanceLifecycleHistoryEntryView> GetCaseHistory(long receivablesCaseId);
    IslamicFinanceReceivablesCaseAuditView? GetCaseAudit(long receivablesCaseId);
    IReadOnlyCollection<IslamicFinanceReceivablesEligibilityInvoiceView> GetEligibleInvoices(long customerPartyId, string? currencyCode, DateOnly asOfDate);
}
