2017-05-22 14:58:25 -04:00
|
|
|
import * as Sequelize from 'sequelize'
|
2017-07-05 07:26:25 -04:00
|
|
|
import * as Promise from 'bluebird'
|
2017-05-22 14:58:25 -04:00
|
|
|
|
2017-06-16 03:54:59 -04:00
|
|
|
import { PodInstance } from '../pod'
|
2017-07-05 07:26:25 -04:00
|
|
|
import { ResultList } from '../../../shared'
|
2017-06-16 03:54:59 -04:00
|
|
|
|
2017-06-10 16:15:25 -04:00
|
|
|
// Don't use barrel, import just what we need
|
2017-07-10 13:43:21 -04:00
|
|
|
import { VideoAbuse as FormatedVideoAbuse } from '../../../shared/models/videos/video-abuse.model'
|
2017-06-10 16:15:25 -04:00
|
|
|
|
2017-05-22 14:58:25 -04:00
|
|
|
export namespace VideoAbuseMethods {
|
2017-06-17 05:28:11 -04:00
|
|
|
export type ToFormatedJSON = (this: VideoAbuseInstance) => FormatedVideoAbuse
|
2017-05-22 14:58:25 -04:00
|
|
|
|
2017-07-05 07:26:25 -04:00
|
|
|
export type ListForApi = (start: number, count: number, sort: string) => Promise< ResultList<VideoAbuseInstance> >
|
2017-05-22 14:58:25 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface VideoAbuseClass {
|
|
|
|
listForApi: VideoAbuseMethods.ListForApi
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface VideoAbuseAttributes {
|
|
|
|
reporterUsername: string
|
|
|
|
reason: string
|
2017-06-16 03:54:59 -04:00
|
|
|
videoId: string
|
2017-05-22 14:58:25 -04:00
|
|
|
}
|
|
|
|
|
2017-06-10 16:15:25 -04:00
|
|
|
export interface VideoAbuseInstance extends VideoAbuseClass, VideoAbuseAttributes, Sequelize.Instance<VideoAbuseAttributes> {
|
2017-05-22 14:58:25 -04:00
|
|
|
id: number
|
|
|
|
createdAt: Date
|
|
|
|
updatedAt: Date
|
2017-06-16 03:54:59 -04:00
|
|
|
|
|
|
|
Pod: PodInstance
|
2017-06-17 05:28:11 -04:00
|
|
|
|
|
|
|
toFormatedJSON: VideoAbuseMethods.ToFormatedJSON
|
2017-05-22 14:58:25 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface VideoAbuseModel extends VideoAbuseClass, Sequelize.Model<VideoAbuseInstance, VideoAbuseAttributes> {}
|