2017-07-05 11:26:25 +00:00
|
|
|
import * as Promise from 'bluebird'
|
2017-11-15 14:12:23 +00:00
|
|
|
import * as Sequelize from 'sequelize'
|
2017-07-05 11:26:25 +00:00
|
|
|
import { ResultList } from '../../../shared'
|
2017-08-25 09:45:31 +00:00
|
|
|
import { VideoAbuse as FormattedVideoAbuse } from '../../../shared/models/videos/video-abuse.model'
|
2017-11-15 14:12:23 +00:00
|
|
|
import { AccountInstance } from '../account/account-interface'
|
|
|
|
import { ServerInstance } from '../server/server-interface'
|
|
|
|
import { VideoInstance } from './video-interface'
|
2017-11-16 16:04:19 +00:00
|
|
|
import { VideoAbuseObject } from '../../../shared/models/activitypub/objects/video-abuse-object'
|
2017-06-10 20:15:25 +00:00
|
|
|
|
2017-05-22 18:58:25 +00:00
|
|
|
export namespace VideoAbuseMethods {
|
2017-08-25 09:45:31 +00:00
|
|
|
export type ToFormattedJSON = (this: VideoAbuseInstance) => FormattedVideoAbuse
|
2017-05-22 18:58:25 +00:00
|
|
|
|
2017-07-05 11:26:25 +00:00
|
|
|
export type ListForApi = (start: number, count: number, sort: string) => Promise< ResultList<VideoAbuseInstance> >
|
2017-11-16 16:04:19 +00:00
|
|
|
export type ToActivityPubObject = () => VideoAbuseObject
|
2017-05-22 18:58:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface VideoAbuseClass {
|
|
|
|
listForApi: VideoAbuseMethods.ListForApi
|
2017-11-16 16:04:19 +00:00
|
|
|
toActivityPubObject: VideoAbuseMethods.ToActivityPubObject
|
2017-05-22 18:58:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface VideoAbuseAttributes {
|
|
|
|
reason: string
|
2017-07-11 14:01:56 +00:00
|
|
|
videoId: number
|
2017-11-15 14:12:23 +00:00
|
|
|
reporterAccountId: number
|
|
|
|
|
|
|
|
Account?: AccountInstance
|
|
|
|
Video?: VideoInstance
|
2017-05-22 18:58:25 +00:00
|
|
|
}
|
|
|
|
|
2017-06-10 20:15:25 +00:00
|
|
|
export interface VideoAbuseInstance extends VideoAbuseClass, VideoAbuseAttributes, Sequelize.Instance<VideoAbuseAttributes> {
|
2017-05-22 18:58:25 +00:00
|
|
|
id: number
|
|
|
|
createdAt: Date
|
|
|
|
updatedAt: Date
|
2017-06-16 07:54:59 +00:00
|
|
|
|
2017-11-15 10:00:25 +00:00
|
|
|
Server: ServerInstance
|
2017-06-17 09:28:11 +00:00
|
|
|
|
2017-08-25 09:45:31 +00:00
|
|
|
toFormattedJSON: VideoAbuseMethods.ToFormattedJSON
|
2017-05-22 18:58:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface VideoAbuseModel extends VideoAbuseClass, Sequelize.Model<VideoAbuseInstance, VideoAbuseAttributes> {}
|