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