mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 09:56:05 +00:00
24 lines
526 B
TypeScript
24 lines
526 B
TypeScript
import { Event as DbEvent, TransactionLink as DbTransactionLink, User as DbUser } from 'database'
|
|
import { Decimal } from 'decimal.js-light'
|
|
|
|
import { Event } from './Event'
|
|
import { EventType } from './EventType'
|
|
|
|
export const EVENT_TRANSACTION_LINK_CREATE = async (
|
|
user: DbUser,
|
|
transactionLink: DbTransactionLink,
|
|
amount: Decimal,
|
|
): Promise<DbEvent> =>
|
|
Event(
|
|
EventType.TRANSACTION_LINK_CREATE,
|
|
user,
|
|
user,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
transactionLink,
|
|
null,
|
|
amount,
|
|
).save()
|