]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - server/models/video/video-abuse-interface.ts
Rename Pod -> Server
[github/Chocobozzz/PeerTube.git] / server / models / video / video-abuse-interface.ts
CommitLineData
e02643f3 1import * as Sequelize from 'sequelize'
6fcd19ba 2import * as Promise from 'bluebird'
e02643f3 3
60862425 4import { ServerInstance } from '../server/server-interface'
6fcd19ba 5import { ResultList } from '../../../shared'
70c065d6 6
69818c93 7// Don't use barrel, import just what we need
0aef76c4 8import { VideoAbuse as FormattedVideoAbuse } from '../../../shared/models/videos/video-abuse.model'
69818c93 9
e02643f3 10export namespace VideoAbuseMethods {
0aef76c4 11 export type ToFormattedJSON = (this: VideoAbuseInstance) => FormattedVideoAbuse
e02643f3 12
6fcd19ba 13 export type ListForApi = (start: number, count: number, sort: string) => Promise< ResultList<VideoAbuseInstance> >
e02643f3
C
14}
15
16export interface VideoAbuseClass {
17 listForApi: VideoAbuseMethods.ListForApi
18}
19
20export interface VideoAbuseAttributes {
21 reporterUsername: string
22 reason: string
0a6658fd 23 videoId: number
e02643f3
C
24}
25
69818c93 26export interface VideoAbuseInstance extends VideoAbuseClass, VideoAbuseAttributes, Sequelize.Instance<VideoAbuseAttributes> {
e02643f3
C
27 id: number
28 createdAt: Date
29 updatedAt: Date
70c065d6 30
60862425 31 Server: ServerInstance
154898b0 32
0aef76c4 33 toFormattedJSON: VideoAbuseMethods.ToFormattedJSON
e02643f3
C
34}
35
36export interface VideoAbuseModel extends VideoAbuseClass, Sequelize.Model<VideoAbuseInstance, VideoAbuseAttributes> {}