]>
Commit | Line | Data |
---|---|---|
6fcd19ba | 1 | import * as Promise from 'bluebird' |
8e13fa7d | 2 | import * as Sequelize from 'sequelize' |
6fcd19ba | 3 | import { ResultList } from '../../../shared' |
0aef76c4 | 4 | import { VideoAbuse as FormattedVideoAbuse } from '../../../shared/models/videos/video-abuse.model' |
8e13fa7d C |
5 | import { AccountInstance } from '../account/account-interface' |
6 | import { ServerInstance } from '../server/server-interface' | |
7 | import { VideoInstance } from './video-interface' | |
21e0727a | 8 | import { VideoAbuseObject } from '../../../shared/models/activitypub/objects/video-abuse-object' |
69818c93 | 9 | |
e02643f3 | 10 | export namespace VideoAbuseMethods { |
0aef76c4 | 11 | export type ToFormattedJSON = (this: VideoAbuseInstance) => FormattedVideoAbuse |
e02643f3 | 12 | |
6fcd19ba | 13 | export type ListForApi = (start: number, count: number, sort: string) => Promise< ResultList<VideoAbuseInstance> > |
21e0727a | 14 | export type ToActivityPubObject = () => VideoAbuseObject |
e02643f3 C |
15 | } |
16 | ||
17 | export interface VideoAbuseClass { | |
18 | listForApi: VideoAbuseMethods.ListForApi | |
21e0727a | 19 | toActivityPubObject: VideoAbuseMethods.ToActivityPubObject |
e02643f3 C |
20 | } |
21 | ||
22 | export interface VideoAbuseAttributes { | |
e02643f3 | 23 | reason: string |
0a6658fd | 24 | videoId: number |
8e13fa7d C |
25 | reporterAccountId: number |
26 | ||
27 | Account?: AccountInstance | |
28 | Video?: VideoInstance | |
e02643f3 C |
29 | } |
30 | ||
69818c93 | 31 | export interface VideoAbuseInstance extends VideoAbuseClass, VideoAbuseAttributes, Sequelize.Instance<VideoAbuseAttributes> { |
e02643f3 C |
32 | id: number |
33 | createdAt: Date | |
34 | updatedAt: Date | |
70c065d6 | 35 | |
60862425 | 36 | Server: ServerInstance |
154898b0 | 37 | |
0aef76c4 | 38 | toFormattedJSON: VideoAbuseMethods.ToFormattedJSON |
e02643f3 C |
39 | } |
40 | ||
41 | export interface VideoAbuseModel extends VideoAbuseClass, Sequelize.Model<VideoAbuseInstance, VideoAbuseAttributes> {} |