diff options
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> {} | ||