mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
21 lines
459 B
TypeScript
21 lines
459 B
TypeScript
import { Transaction as DbTransaction } from '@entity/Transaction'
|
|
|
|
import { Order } from '@enum/Order'
|
|
|
|
export const getTransactionList = async (
|
|
userId: number,
|
|
limit: number,
|
|
offset: number,
|
|
order: Order,
|
|
): Promise<[DbTransaction[], number]> => {
|
|
return DbTransaction.findAndCount({
|
|
where: {
|
|
userId,
|
|
},
|
|
order: { balanceDate: order, id: order },
|
|
relations: ['previousTransaction'],
|
|
skip: offset,
|
|
take: limit,
|
|
})
|
|
}
|