]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame_incremental - server/models/video/video-abuse-interface.ts
Add this context to instance model functions
[github/Chocobozzz/PeerTube.git] / server / models / video / video-abuse-interface.ts
... / ...
CommitLineData
1import * as Sequelize from 'sequelize'
2
3import { PodInstance } from '../pod'
4
5// Don't use barrel, import just what we need
6import { VideoAbuse as FormatedVideoAbuse } from '../../../shared/models/video-abuse.model'
7
8export namespace VideoAbuseMethods {
9 export type toFormatedJSON = () => FormatedVideoAbuse
10
11 export type ListForApiCallback = (err: Error, videoAbuseInstances?: VideoAbuseInstance[], total?: number) => void
12 export type ListForApi = (start: number, count: number, sort: string, callback: ListForApiCallback) => void
13}
14
15export interface VideoAbuseClass {
16 listForApi: VideoAbuseMethods.ListForApi
17}
18
19export interface VideoAbuseAttributes {
20 reporterUsername: string
21 reason: string
22 videoId: string
23}
24
25export interface VideoAbuseInstance extends VideoAbuseClass, VideoAbuseAttributes, Sequelize.Instance<VideoAbuseAttributes> {
26 id: number
27 createdAt: Date
28 updatedAt: Date
29
30 Pod: PodInstance
31}
32
33export interface VideoAbuseModel extends VideoAbuseClass, Sequelize.Model<VideoAbuseInstance, VideoAbuseAttributes> {}