mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
25 lines
618 B
TypeScript
25 lines
618 B
TypeScript
import { ContributionLink as DbContributionLink } from '@entity/ContributionLink'
|
|
import { Event as DbEvent } from '@entity/Event'
|
|
import { User as DbUser } from '@entity/User'
|
|
import { Decimal } from 'decimal.js-light'
|
|
|
|
import { Event, EventType } from './Event'
|
|
|
|
export const EVENT_ADMIN_CONTRIBUTION_LINK_CREATE = async (
|
|
moderator: DbUser,
|
|
contributionLink: DbContributionLink,
|
|
amount: Decimal,
|
|
): Promise<DbEvent> =>
|
|
Event(
|
|
EventType.ADMIN_CONTRIBUTION_LINK_CREATE,
|
|
{ id: 0 } as DbUser,
|
|
moderator,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
contributionLink,
|
|
amount,
|
|
).save()
|