27 lines
1.6 KiB
C#
27 lines
1.6 KiB
C#
using General_Ledger_Service.DTOs.Accounts;
|
|
using General_Ledger_Service.DTOs.Reports;
|
|
using General_Ledger_Service.Models;
|
|
//using
|
|
|
|
namespace General_Ledger_Service.Interfaces.Repositories
|
|
{
|
|
public interface IAccountRepository
|
|
{
|
|
Task<Account?> GetByIdAsync(long accountId);
|
|
Task<Account?> GetByCodeAsync(string accountCode);
|
|
Task<Account?> GetByNameAndParentAsync(string accountName, long? parentAccountId);
|
|
Task<int> GetAncestorDepthAsync(long parentAccountId);
|
|
Task<string?> GetAncestorBreadcrumbAsync(long accountId);
|
|
Task<List<AccountTreeNode>> GetDescendantTreeAsync(long accountId);
|
|
Task<bool> WouldCreateCycleAsync(long accountId, long newParentId);
|
|
Task<(List<Account> Items, int TotalCount)> SearchAsync(short? accountTypeId, bool? isActive, bool? isPostable, int? page, int? pageSize);
|
|
Task<Account> AddAsync(Account account);
|
|
Task<List<TrialBalanceRowDto>> GetTrialBalanceAsync(DateOnly asOfDate);
|
|
Task<List<BalanceSheetLeafRowDto>> GetBalanceSheetLeafRowsAsync(DateOnly asOfDate);
|
|
Task<List<ProfitAndLossLeafRowDto>> GetProfitAndLossLeafRowsAsync(DateOnly periodStart, DateOnly periodEnd, bool includeClosing = false);
|
|
Task<List<CashFlowWorkingCapitalChangeDto>> GetCashFlowWorkingCapitalChangesAsync(DateOnly periodStart, DateOnly periodEnd, long cashAccountRootId);
|
|
Task<List<CashFlowLineDto>> GetCashFlowCategoryLinesAsync(string category, DateOnly periodStart, DateOnly periodEnd, long cashAccountRootId);
|
|
Task<decimal> GetCashBalanceAsync(DateOnly asOfDate, long cashAccountRootId);
|
|
}
|
|
}
|