1
0
Fork 0
peertube/server/models/video/video-abuse-interface.ts

37 lines
1.1 KiB
TypeScript
Raw Normal View History

2017-05-22 18:58:25 +00:00
import * as Sequelize from 'sequelize'
import * as Promise from 'bluebird'
2017-05-22 18:58:25 +00:00
import { PodInstance } from '../pod'
import { ResultList } from '../../../shared'
2017-06-10 20:15:25 +00:00
// Don't use barrel, import just what we need
import { VideoAbuse as FormatedVideoAbuse } from '../../../shared/models/videos/video-abuse.model'
2017-06-10 20:15:25 +00:00
2017-05-22 18:58:25 +00:00
export namespace VideoAbuseMethods {
2017-06-17 09:28:11 +00:00
export type ToFormatedJSON = (this: VideoAbuseInstance) => FormatedVideoAbuse
2017-05-22 18:58:25 +00:00
export type ListForApi = (start: number, count: number, sort: string) => Promise< ResultList<VideoAbuseInstance> >
2017-05-22 18:58:25 +00:00
}
export interface VideoAbuseClass {
listForApi: VideoAbuseMethods.ListForApi
}
export interface VideoAbuseAttributes {
reporterUsername: string
reason: string
videoId: string
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
Pod: PodInstance
2017-06-17 09:28:11 +00:00
toFormatedJSON: VideoAbuseMethods.ToFormatedJSON
2017-05-22 18:58:25 +00:00
}
export interface VideoAbuseModel extends VideoAbuseClass, Sequelize.Model<VideoAbuseInstance, VideoAbuseAttributes> {}