diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-11-15 15:12:23 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-11-27 19:40:52 +0100 |
commit | 8e13fa7d09e9925b4559cbba6c5d72c5ff1bd391 (patch) | |
tree | a59070f4dc6b52a5b422bd31a8eb8ea3bff831a0 /server/models/video/video-abuse-interface.ts | |
parent | 59c857da5961e2bcddcfd07832783c1e4afcd01a (diff) | |
download | PeerTube-8e13fa7d09e9925b4559cbba6c5d72c5ff1bd391.tar.gz PeerTube-8e13fa7d09e9925b4559cbba6c5d72c5ff1bd391.tar.zst PeerTube-8e13fa7d09e9925b4559cbba6c5d72c5ff1bd391.zip |
Add video abuse to activity pub
Diffstat (limited to 'server/models/video/video-abuse-interface.ts')
-rw-r--r-- | server/models/video/video-abuse-interface.ts | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/server/models/video/video-abuse-interface.ts b/server/models/video/video-abuse-interface.ts index 16806cae2..96f0fbe4a 100644 --- a/server/models/video/video-abuse-interface.ts +++ b/server/models/video/video-abuse-interface.ts | |||
@@ -1,11 +1,10 @@ | |||
1 | import * as Sequelize from 'sequelize' | ||
2 | import * as Promise from 'bluebird' | 1 | import * as Promise from 'bluebird' |
3 | 2 | import * as Sequelize from 'sequelize' | |
4 | import { ServerInstance } from '../server/server-interface' | ||
5 | import { ResultList } from '../../../shared' | 3 | import { ResultList } from '../../../shared' |
6 | |||
7 | // Don't use barrel, import just what we need | ||
8 | import { VideoAbuse as FormattedVideoAbuse } from '../../../shared/models/videos/video-abuse.model' | 4 | import { VideoAbuse as FormattedVideoAbuse } from '../../../shared/models/videos/video-abuse.model' |
5 | import { AccountInstance } from '../account/account-interface' | ||
6 | import { ServerInstance } from '../server/server-interface' | ||
7 | import { VideoInstance } from './video-interface' | ||
9 | 8 | ||
10 | export namespace VideoAbuseMethods { | 9 | export namespace VideoAbuseMethods { |
11 | export type ToFormattedJSON = (this: VideoAbuseInstance) => FormattedVideoAbuse | 10 | export type ToFormattedJSON = (this: VideoAbuseInstance) => FormattedVideoAbuse |
@@ -18,9 +17,12 @@ export interface VideoAbuseClass { | |||
18 | } | 17 | } |
19 | 18 | ||
20 | export interface VideoAbuseAttributes { | 19 | export interface VideoAbuseAttributes { |
21 | reporterUsername: string | ||
22 | reason: string | 20 | reason: string |
23 | videoId: number | 21 | videoId: number |
22 | reporterAccountId: number | ||
23 | |||
24 | Account?: AccountInstance | ||
25 | Video?: VideoInstance | ||
24 | } | 26 | } |
25 | 27 | ||
26 | export interface VideoAbuseInstance extends VideoAbuseClass, VideoAbuseAttributes, Sequelize.Instance<VideoAbuseAttributes> { | 28 | export interface VideoAbuseInstance extends VideoAbuseClass, VideoAbuseAttributes, Sequelize.Instance<VideoAbuseAttributes> { |