aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/models/users/user-notification.model.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-12-26 10:36:24 +0100
committerChocobozzz <chocobozzz@cpy.re>2019-01-09 11:15:15 +0100
commitcef534ed53e4518fe0acf581bfe880788d42fc36 (patch)
tree115b51ea5136849a2336d44915c7780649f25dc2 /shared/models/users/user-notification.model.ts
parent1de1d05f4c61fe059fa5e24e79c92582f0e7e4b3 (diff)
downloadPeerTube-cef534ed53e4518fe0acf581bfe880788d42fc36.tar.gz
PeerTube-cef534ed53e4518fe0acf581bfe880788d42fc36.tar.zst
PeerTube-cef534ed53e4518fe0acf581bfe880788d42fc36.zip
Add user notification base code
Diffstat (limited to 'shared/models/users/user-notification.model.ts')
-rw-r--r--shared/models/users/user-notification.model.ts47
1 files changed, 47 insertions, 0 deletions
diff --git a/shared/models/users/user-notification.model.ts b/shared/models/users/user-notification.model.ts
new file mode 100644
index 000000000..39beb2350
--- /dev/null
+++ b/shared/models/users/user-notification.model.ts
@@ -0,0 +1,47 @@
1export enum UserNotificationType {
2 NEW_VIDEO_FROM_SUBSCRIPTION = 1,
3 NEW_COMMENT_ON_MY_VIDEO = 2,
4 NEW_VIDEO_ABUSE_FOR_MODERATORS = 3,
5 BLACKLIST_ON_MY_VIDEO = 4,
6 UNBLACKLIST_ON_MY_VIDEO = 5
7}
8
9interface VideoInfo {
10 id: number
11 uuid: string
12 name: string
13}
14
15export interface UserNotification {
16 id: number
17 type: UserNotificationType
18 read: boolean
19
20 video?: VideoInfo & {
21 channel: {
22 id: number
23 displayName: string
24 }
25 }
26
27 comment?: {
28 id: number
29 account: {
30 id: number
31 displayName: string
32 }
33 }
34
35 videoAbuse?: {
36 id: number
37 video: VideoInfo
38 }
39
40 videoBlacklist?: {
41 id: number
42 video: VideoInfo
43 }
44
45 createdAt: string
46 updatedAt: string
47}