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.ts22
1 files changed, 11 insertions, 11 deletions
diff --git a/server/models/request/request-video-qadu-interface.ts b/server/models/request/request-video-qadu-interface.ts
index 805771cda..9a172a4d4 100644
--- a/server/models/request/request-video-qadu-interface.ts
+++ b/server/models/request/request-video-qadu-interface.ts
@@ -1,5 +1,7 @@
1import * as Sequelize from 'sequelize' 1import * as Sequelize from 'sequelize'
2import * as Promise from 'bluebird'
2 3
4import { AbstractRequestClass, AbstractRequestToPodClass } from './abstract-request-interface'
3import { VideoInstance } from '../video' 5import { VideoInstance } from '../video'
4import { PodInstance } from '../pod' 6import { PodInstance } from '../pod'
5 7
@@ -14,20 +16,16 @@ export type RequestsVideoQaduGrouped = {
14} 16}
15 17
16export namespace RequestVideoQaduMethods { 18export namespace RequestVideoQaduMethods {
17 export type CountTotalRequestsCallback = (err: Error, total: number) => void 19 export type CountTotalRequests = () => Promise<number>
18 export type CountTotalRequests = (callback: CountTotalRequestsCallback) => void
19 20
20 export type ListWithLimitAndRandomCallback = (err: Error, requestsGrouped?: RequestsVideoQaduGrouped) => void 21 export type ListWithLimitAndRandom = (limitPods: number, limitRequestsPerPod: number) => Promise<RequestsVideoQaduGrouped>
21 export type ListWithLimitAndRandom = (limitPods: number, limitRequestsPerPod: number, callback: ListWithLimitAndRandomCallback) => void
22 22
23 export type RemoveByRequestIdsAndPodCallback = () => void 23 export type RemoveByRequestIdsAndPod = (ids: number[], podId: number) => Promise<number>
24 export type RemoveByRequestIdsAndPod = (ids: number[], podId: number, callback: RemoveByRequestIdsAndPodCallback) => void
25 24
26 export type RemoveAllCallback = () => void 25 export type RemoveAll = () => Promise<void>
27 export type RemoveAll = (callback: RemoveAllCallback) => void
28} 26}
29 27
30export interface RequestVideoQaduClass { 28export interface RequestVideoQaduClass extends AbstractRequestClass<RequestsVideoQaduGrouped>, AbstractRequestToPodClass {
31 countTotalRequests: RequestVideoQaduMethods.CountTotalRequests 29 countTotalRequests: RequestVideoQaduMethods.CountTotalRequests
32 listWithLimitAndRandom: RequestVideoQaduMethods.ListWithLimitAndRandom 30 listWithLimitAndRandom: RequestVideoQaduMethods.ListWithLimitAndRandom
33 removeByRequestIdsAndPod: RequestVideoQaduMethods.RemoveByRequestIdsAndPod 31 removeByRequestIdsAndPod: RequestVideoQaduMethods.RemoveByRequestIdsAndPod
@@ -38,11 +36,13 @@ export interface RequestVideoQaduAttributes {
38 type: RequestVideoQaduType 36 type: RequestVideoQaduType
39} 37}
40 38
41export interface RequestVideoQaduInstance extends RequestVideoQaduClass, RequestVideoQaduAttributes, Sequelize.Instance<RequestVideoQaduAttributes> { 39export interface RequestVideoQaduInstance
40 extends RequestVideoQaduClass, RequestVideoQaduAttributes, Sequelize.Instance<RequestVideoQaduAttributes> {
42 id: number 41 id: number
43 42
44 Pod: PodInstance 43 Pod: PodInstance
45 Video: VideoInstance 44 Video: VideoInstance
46} 45}
47 46
48export interface RequestVideoQaduModel extends RequestVideoQaduClass, Sequelize.Model<RequestVideoQaduInstance, RequestVideoQaduAttributes> {} 47export interface RequestVideoQaduModel
48 extends RequestVideoQaduClass, Sequelize.Model<RequestVideoQaduInstance, RequestVideoQaduAttributes> {}