const _results = await this.getDBContext()
.select()
.from(payouts)
.leftJoin(
userBankingAccounts,
eq(userBankingAccounts.id, payouts.bankAccountId),
)
.where(eq(userBankingAccounts.userId, affiliate.userId))
.where(and(...timeQuery))
.offset(pagination.offset)
.limit(pagination.limit)
.orderBy(orderQuery);
const _results = await this.getDBContext()
.select()
.from(payouts)
.leftJoin(
userBankingAccounts,
eq(userBankingAccounts.id, payouts.bankAccountId),
)
.where(eq(userBankingAccounts.userId, affiliate.userId))
.where(and(...timeQuery))
.offset(pagination.offset)
.limit(pagination.limit)
.orderBy(orderQuery);