aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/request/request-video-qadu-interface.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/models/request/request-video-qadu-interface.ts')
-rw-r--r--server/models/request/request-video-qadu-interface.ts48
1 files changed, 0 insertions, 48 deletions
diff --git a/server/models/request/request-video-qadu-interface.ts b/server/models/request/request-video-qadu-interface.ts
deleted file mode 100644
index b7b7b1ecc..000000000
--- a/server/models/request/request-video-qadu-interface.ts
+++ /dev/null
@@ -1,48 +0,0 @@
1import * as Sequelize from 'sequelize'
2import * as Promise from 'bluebird'
3
4import { AbstractRequestClass, AbstractRequestToPodClass } from './abstract-request-interface'
5import { VideoInstance } from '../video/video-interface'
6import { PodInstance } from '../pod/pod-interface'
7
8import { RequestVideoQaduType } from '../../../shared/models/request-scheduler.model'
9
10export type RequestsVideoQaduGrouped = {
11 [ podId: number ]: {
12 request: RequestVideoQaduInstance
13 video: VideoInstance
14 pod: PodInstance
15 }
16}
17
18export namespace RequestVideoQaduMethods {
19 export type CountTotalRequests = () => Promise<number>
20
21 export type ListWithLimitAndRandom = (limitPods: number, limitRequestsPerPod: number) => Promise<RequestsVideoQaduGrouped>
22
23 export type RemoveByRequestIdsAndPod = (ids: number[], podId: number) => Promise<number>
24
25 export type RemoveAll = () => Promise<void>
26}
27
28export interface RequestVideoQaduClass extends AbstractRequestClass<RequestsVideoQaduGrouped>, AbstractRequestToPodClass {
29 countTotalRequests: RequestVideoQaduMethods.CountTotalRequests
30 listWithLimitAndRandom: RequestVideoQaduMethods.ListWithLimitAndRandom
31 removeByRequestIdsAndPod: RequestVideoQaduMethods.RemoveByRequestIdsAndPod
32 removeAll: RequestVideoQaduMethods.RemoveAll
33}
34
35export interface RequestVideoQaduAttributes {
36 type: RequestVideoQaduType
37}
38
39export interface RequestVideoQaduInstance
40 extends RequestVideoQaduClass, RequestVideoQaduAttributes, Sequelize.Instance<RequestVideoQaduAttributes> {
41 id: number
42
43 Pod: PodInstance
44 Video: VideoInstance
45}
46
47export interface RequestVideoQaduModel
48 extends RequestVideoQaduClass, Sequelize.Model<RequestVideoQaduInstance, RequestVideoQaduAttributes> {}