]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - server/models/video/video-abuse-interface.ts
First step upload with new design
[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'
21e0727a 8import { VideoAbuseObject } from '../../../shared/models/activitypub/objects/video-abuse-object'
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> >
21e0727a 14 export type ToActivityPubObject = () => VideoAbuseObject
e02643f3
C
15}
16
17export interface VideoAbuseClass {
18 listForApi: VideoAbuseMethods.ListForApi
21e0727a 19 toActivityPubObject: VideoAbuseMethods.ToActivityPubObject
e02643f3
C
20}
21
22export interface VideoAbuseAttributes {
e02643f3 23 reason: string
0a6658fd 24 videoId: number
8e13fa7d
C
25 reporterAccountId: number
26
27 Account?: AccountInstance
28 Video?: VideoInstance
e02643f3
C
29}
30
69818c93 31export interface VideoAbuseInstance extends VideoAbuseClass, VideoAbuseAttributes, Sequelize.Instance<VideoAbuseAttributes> {
e02643f3
C
32 id: number
33 createdAt: Date
34 updatedAt: Date
70c065d6 35
60862425 36 Server: ServerInstance
154898b0 37
0aef76c4 38 toFormattedJSON: VideoAbuseMethods.ToFormattedJSON
e02643f3
C
39}
40
41export interface VideoAbuseModel extends VideoAbuseClass, Sequelize.Model<VideoAbuseInstance, VideoAbuseAttributes> {}