-
Notifications
You must be signed in to change notification settings - Fork 70
/
event.model.ts
52 lines (46 loc) · 1.12 KB
/
event.model.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import {AnyObject, model, property} from '@loopback/repository';
import {CoreEntity} from '@sourceloop/core';
import {IEvent} from '../interfaces';
@model({
name: 'events',
})
export class Event extends CoreEntity<Event> implements IEvent {
@property({
type: 'string',
id: true,
generated: true,
})
id: string;
@property({
type: 'string',
required: true,
description:
'An identifier for a particular event queued by a service or a user',
})
key: string;
@property({
type: 'string',
required: true,
description: 'A short description of an event',
})
description: string;
@property({
type: 'string',
required: true,
description: 'Origination of an event- can be a service or from a user',
})
source: string;
@property({
type: 'object',
required: true,
description:
'A dynamic object that contains information to be run in the workers of a bpmn engine',
})
payload: AnyObject;
@property({
type: 'number',
required: true,
description: 'A short message to indicate the progression of the event',
})
timestamp: number;
}