mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 09:56:05 +00:00
27 lines
561 B
TypeScript
27 lines
561 B
TypeScript
import {
|
|
Contribution as DbContribution,
|
|
ContributionMessage as DbContributionMessage,
|
|
Event as DbEvent,
|
|
User as DbUser,
|
|
} from 'database'
|
|
|
|
import { Event } from './Event'
|
|
import { EventType } from './EventType'
|
|
|
|
export const EVENT_CONTRIBUTION_MESSAGE_CREATE = async (
|
|
user: DbUser,
|
|
contribution: DbContribution,
|
|
contributionMessage: DbContributionMessage,
|
|
): Promise<DbEvent> =>
|
|
Event(
|
|
EventType.CONTRIBUTION_MESSAGE_CREATE,
|
|
user,
|
|
user,
|
|
null,
|
|
null,
|
|
contribution,
|
|
contributionMessage,
|
|
null,
|
|
null,
|
|
).save()
|