using CashLineERP.Application.IslamicFinance;

namespace CashLineERP.Application.IslamicFinance.Murabaha;

public interface IMurabahaCaseRepository
{
    IReadOnlyCollection<IslamicFinanceMurabahaCaseDetailView> GetCases(
        string? statusCode = null,
        long? financingRequestId = null,
        long? partnerLenderId = null);
    IslamicFinanceMurabahaCaseDetailView? GetCase(long murabahaCaseId);
    IslamicFinanceMurabahaCaseDetailView Create(CreateIslamicFinanceMurabahaCaseCommand command);
    IslamicFinanceMurabahaCaseDetailView Submit(long murabahaCaseId, long actorUserId);
    IslamicFinanceMurabahaCaseDetailView Approve(long murabahaCaseId, long actorUserId);
    IslamicFinanceMurabahaCaseDetailView Activate(long murabahaCaseId, long actorUserId);
    IslamicFinanceMurabahaScheduleView GenerateSchedule(long murabahaCaseId, long actorUserId, GenerateIslamicFinanceMurabahaScheduleCommand command);
    IslamicFinanceMurabahaScheduleView? GetSchedule(long murabahaCaseId);
    IslamicFinanceMurabahaScheduleLineView? GetScheduleInstallment(long murabahaCaseId, int installmentNumber);
    IReadOnlyCollection<IslamicFinanceLifecycleHistoryEntryView> GetCaseHistory(long murabahaCaseId);
    IslamicFinanceMurabahaCaseAuditView? GetCaseAudit(long murabahaCaseId);
}
