aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/request-video-event-interface.ts
blob: a31c7108f1e6246da7a7be2b5149a69130031a23 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import * as Sequelize from 'sequelize'

export namespace RequestVideoEventMethods {
  export type CountTotalRequests = (callback) => void
  export type ListWithLimitAndRandom = (limitPods, limitRequestsPerPod, callback) => void
  export type RemoveByRequestIdsAndPod = (ids, podId, callback) => void
  export type RemoveAll = (callback) => void
}

export interface RequestVideoEventClass {
  countTotalRequests: RequestVideoEventMethods.CountTotalRequests
  listWithLimitAndRandom: RequestVideoEventMethods.ListWithLimitAndRandom
  removeByRequestIdsAndPod: RequestVideoEventMethods.RemoveByRequestIdsAndPod
  removeAll: RequestVideoEventMethods.RemoveAll
}

export interface RequestVideoEventAttributes {
  type: string
  count: number
}

export interface RequestVideoEventInstance extends Sequelize.Instance<RequestVideoEventAttributes> {
  id: number
}

export interface RequestVideoEventModel extends RequestVideoEventClass, Sequelize.Model<RequestVideoEventInstance, RequestVideoEventAttributes> {}