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