diff options
author | Chocobozzz <me@florianbigard.com> | 2018-08-14 14:59:53 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-08-14 15:00:01 +0200 |
commit | 59c76ffa8f503e962d517c78f033f1beccb1de1a (patch) | |
tree | d567991b10cffd59322dd679d5188e7d1ec7ddce /shared/models/videos/abuse | |
parent | 13b6dc1f3437560c55a5dfc3a94a2b162654e5c9 (diff) | |
download | PeerTube-59c76ffa8f503e962d517c78f033f1beccb1de1a.tar.gz PeerTube-59c76ffa8f503e962d517c78f033f1beccb1de1a.tar.zst PeerTube-59c76ffa8f503e962d517c78f033f1beccb1de1a.zip |
Flat shared module directory
Diffstat (limited to 'shared/models/videos/abuse')
4 files changed, 34 insertions, 0 deletions
diff --git a/shared/models/videos/abuse/video-abuse-create.model.ts b/shared/models/videos/abuse/video-abuse-create.model.ts new file mode 100644 index 000000000..db6458275 --- /dev/null +++ b/shared/models/videos/abuse/video-abuse-create.model.ts | |||
@@ -0,0 +1,3 @@ | |||
1 | export interface VideoAbuseCreate { | ||
2 | reason: string | ||
3 | } | ||
diff --git a/shared/models/videos/abuse/video-abuse-state.model.ts b/shared/models/videos/abuse/video-abuse-state.model.ts new file mode 100644 index 000000000..529f034bd --- /dev/null +++ b/shared/models/videos/abuse/video-abuse-state.model.ts | |||
@@ -0,0 +1,5 @@ | |||
1 | export enum VideoAbuseState { | ||
2 | PENDING = 1, | ||
3 | REJECTED = 2, | ||
4 | ACCEPTED = 3 | ||
5 | } | ||
diff --git a/shared/models/videos/abuse/video-abuse-update.model.ts b/shared/models/videos/abuse/video-abuse-update.model.ts new file mode 100644 index 000000000..9b32aae48 --- /dev/null +++ b/shared/models/videos/abuse/video-abuse-update.model.ts | |||
@@ -0,0 +1,6 @@ | |||
1 | import { VideoAbuseState } from './video-abuse-state.model' | ||
2 | |||
3 | export interface VideoAbuseUpdate { | ||
4 | moderationComment?: string | ||
5 | state?: VideoAbuseState | ||
6 | } | ||
diff --git a/shared/models/videos/abuse/video-abuse.model.ts b/shared/models/videos/abuse/video-abuse.model.ts new file mode 100644 index 000000000..4f668795a --- /dev/null +++ b/shared/models/videos/abuse/video-abuse.model.ts | |||
@@ -0,0 +1,20 @@ | |||
1 | import { Account } from '../../actors/index' | ||
2 | import { VideoConstant } from '../video-constant.model' | ||
3 | import { VideoAbuseState } from './video-abuse-state.model' | ||
4 | |||
5 | export interface VideoAbuse { | ||
6 | id: number | ||
7 | reason: string | ||
8 | reporterAccount: Account | ||
9 | |||
10 | state: VideoConstant<VideoAbuseState> | ||
11 | moderationComment?: string | ||
12 | |||
13 | video: { | ||
14 | id: number | ||
15 | name: string | ||
16 | uuid: string | ||
17 | } | ||
18 | |||
19 | createdAt: Date | ||
20 | } | ||