PeerTube/server/models/video/video-abuse-interface.ts

29 lines
967 B
TypeScript
Raw Normal View History

2017-05-22 13:58:25 -05:00
import * as Sequelize from 'sequelize'
2017-06-10 15:15:25 -05:00
// Don't use barrel, import just what we need
2017-06-16 02:45:46 -05:00
import { VideoAbuse as FormatedVideoAbuse } from '../../../shared/models/video-abuse.model'
2017-06-10 15:15:25 -05:00
2017-05-22 13:58:25 -05:00
export namespace VideoAbuseMethods {
2017-06-10 15:15:25 -05:00
export type toFormatedJSON = () => FormatedVideoAbuse
2017-05-22 13:58:25 -05:00
2017-06-10 15:15:25 -05:00
export type ListForApiCallback = (err: Error, videoAbuseInstances?: VideoAbuseInstance[], total?: number) => void
export type ListForApi = (start: number, count: number, sort: string, callback: ListForApiCallback) => void
2017-05-22 13:58:25 -05:00
}
export interface VideoAbuseClass {
listForApi: VideoAbuseMethods.ListForApi
}
export interface VideoAbuseAttributes {
reporterUsername: string
reason: string
}
2017-06-10 15:15:25 -05:00
export interface VideoAbuseInstance extends VideoAbuseClass, VideoAbuseAttributes, Sequelize.Instance<VideoAbuseAttributes> {
2017-05-22 13:58:25 -05:00
id: number
createdAt: Date
updatedAt: Date
}
export interface VideoAbuseModel extends VideoAbuseClass, Sequelize.Model<VideoAbuseInstance, VideoAbuseAttributes> {}