aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video/video-abuse-interface.ts
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-06-16 09:45:46 +0200
committerChocobozzz <florian.bigard@gmail.com>2017-06-16 09:45:46 +0200
commit74889a71fe687dda74f2a687653122327807af36 (patch)
treee938e8b6401b74fbec80513a877d9967f2c0dbcd /server/models/video/video-abuse-interface.ts
parent15a302943d84bc0978b84fe33110c4daa451d311 (diff)
downloadPeerTube-74889a71fe687dda74f2a687653122327807af36.tar.gz
PeerTube-74889a71fe687dda74f2a687653122327807af36.tar.zst
PeerTube-74889a71fe687dda74f2a687653122327807af36.zip
Reorganize model files
Diffstat (limited to 'server/models/video/video-abuse-interface.ts')
-rw-r--r--server/models/video/video-abuse-interface.ts28
1 files changed, 28 insertions, 0 deletions
diff --git a/server/models/video/video-abuse-interface.ts b/server/models/video/video-abuse-interface.ts
new file mode 100644
index 000000000..4b7f2a2ec
--- /dev/null
+++ b/server/models/video/video-abuse-interface.ts
@@ -0,0 +1,28 @@
1import * as Sequelize from 'sequelize'
2
3// Don't use barrel, import just what we need
4import { VideoAbuse as FormatedVideoAbuse } from '../../../shared/models/video-abuse.model'
5
6export namespace VideoAbuseMethods {
7 export type toFormatedJSON = () => FormatedVideoAbuse
8
9 export type ListForApiCallback = (err: Error, videoAbuseInstances?: VideoAbuseInstance[], total?: number) => void
10 export type ListForApi = (start: number, count: number, sort: string, callback: ListForApiCallback) => void
11}
12
13export interface VideoAbuseClass {
14 listForApi: VideoAbuseMethods.ListForApi
15}
16
17export interface VideoAbuseAttributes {
18 reporterUsername: string
19 reason: string
20}
21
22export interface VideoAbuseInstance extends VideoAbuseClass, VideoAbuseAttributes, Sequelize.Instance<VideoAbuseAttributes> {
23 id: number
24 createdAt: Date
25 updatedAt: Date
26}
27
28export interface VideoAbuseModel extends VideoAbuseClass, Sequelize.Model<VideoAbuseInstance, VideoAbuseAttributes> {}