diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-06-16 09:45:46 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-06-16 09:45:46 +0200 |
commit | 74889a71fe687dda74f2a687653122327807af36 (patch) | |
tree | e938e8b6401b74fbec80513a877d9967f2c0dbcd /server/models/video/video-abuse-interface.ts | |
parent | 15a302943d84bc0978b84fe33110c4daa451d311 (diff) | |
download | PeerTube-74889a71fe687dda74f2a687653122327807af36.tar.gz PeerTube-74889a71fe687dda74f2a687653122327807af36.tar.zst PeerTube-74889a71fe687dda74f2a687653122327807af36.zip |
Reorganize model files
Diffstat (limited to 'server/models/video/video-abuse-interface.ts')
-rw-r--r-- | server/models/video/video-abuse-interface.ts | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/server/models/video/video-abuse-interface.ts b/server/models/video/video-abuse-interface.ts new file mode 100644 index 000000000..4b7f2a2ec --- /dev/null +++ b/server/models/video/video-abuse-interface.ts | |||
@@ -0,0 +1,28 @@ | |||
1 | import * as Sequelize from 'sequelize' | ||
2 | |||
3 | // Don't use barrel, import just what we need | ||
4 | import { VideoAbuse as FormatedVideoAbuse } from '../../../shared/models/video-abuse.model' | ||
5 | |||
6 | export namespace VideoAbuseMethods { | ||
7 | export type toFormatedJSON = () => FormatedVideoAbuse | ||
8 | |||
9 | export type ListForApiCallback = (err: Error, videoAbuseInstances?: VideoAbuseInstance[], total?: number) => void | ||
10 | export type ListForApi = (start: number, count: number, sort: string, callback: ListForApiCallback) => void | ||
11 | } | ||
12 | |||
13 | export interface VideoAbuseClass { | ||
14 | listForApi: VideoAbuseMethods.ListForApi | ||
15 | } | ||
16 | |||
17 | export interface VideoAbuseAttributes { | ||
18 | reporterUsername: string | ||
19 | reason: string | ||
20 | } | ||
21 | |||
22 | export interface VideoAbuseInstance extends VideoAbuseClass, VideoAbuseAttributes, Sequelize.Instance<VideoAbuseAttributes> { | ||
23 | id: number | ||
24 | createdAt: Date | ||
25 | updatedAt: Date | ||
26 | } | ||
27 | |||
28 | export interface VideoAbuseModel extends VideoAbuseClass, Sequelize.Model<VideoAbuseInstance, VideoAbuseAttributes> {} | ||