diff options
author | Chocobozzz <me@florianbigard.com> | 2017-12-12 17:53:50 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2017-12-13 16:50:33 +0100 |
commit | 3fd3ab2d34d512b160a5e6084d7609be7b4f4452 (patch) | |
tree | e5ca358287fca6ecacce83defcf23af1e8e9f419 /server/models/video/video-abuse-interface.ts | |
parent | c893d4514e6ecbf282c7985fe5f82b8acd8a1137 (diff) | |
download | PeerTube-3fd3ab2d34d512b160a5e6084d7609be7b4f4452.tar.gz PeerTube-3fd3ab2d34d512b160a5e6084d7609be7b4f4452.tar.zst PeerTube-3fd3ab2d34d512b160a5e6084d7609be7b4f4452.zip |
Move models to typescript-sequelize
Diffstat (limited to 'server/models/video/video-abuse-interface.ts')
-rw-r--r-- | server/models/video/video-abuse-interface.ts | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/server/models/video/video-abuse-interface.ts b/server/models/video/video-abuse-interface.ts deleted file mode 100644 index feafc4a19..000000000 --- a/server/models/video/video-abuse-interface.ts +++ /dev/null | |||
@@ -1,41 +0,0 @@ | |||
1 | import * as Promise from 'bluebird' | ||
2 | import * as Sequelize from 'sequelize' | ||
3 | import { ResultList } from '../../../shared' | ||
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' | ||
8 | import { VideoAbuseObject } from '../../../shared/models/activitypub/objects/video-abuse-object' | ||
9 | |||
10 | export namespace VideoAbuseMethods { | ||
11 | export type ToFormattedJSON = (this: VideoAbuseInstance) => FormattedVideoAbuse | ||
12 | |||
13 | export type ListForApi = (start: number, count: number, sort: string) => Promise< ResultList<VideoAbuseInstance> > | ||
14 | export type ToActivityPubObject = () => VideoAbuseObject | ||
15 | } | ||
16 | |||
17 | export interface VideoAbuseClass { | ||
18 | listForApi: VideoAbuseMethods.ListForApi | ||
19 | toActivityPubObject: VideoAbuseMethods.ToActivityPubObject | ||
20 | } | ||
21 | |||
22 | export interface VideoAbuseAttributes { | ||
23 | reason: string | ||
24 | videoId: number | ||
25 | reporterAccountId: number | ||
26 | |||
27 | Account?: AccountInstance | ||
28 | Video?: VideoInstance | ||
29 | } | ||
30 | |||
31 | export interface VideoAbuseInstance extends VideoAbuseClass, VideoAbuseAttributes, Sequelize.Instance<VideoAbuseAttributes> { | ||
32 | id: number | ||
33 | createdAt: Date | ||
34 | updatedAt: Date | ||
35 | |||
36 | Server: ServerInstance | ||
37 | |||
38 | toFormattedJSON: VideoAbuseMethods.ToFormattedJSON | ||
39 | } | ||
40 | |||
41 | export interface VideoAbuseModel extends VideoAbuseClass, Sequelize.Model<VideoAbuseInstance, VideoAbuseAttributes> {} | ||