diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-05-22 20:58:25 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-05-25 17:32:16 +0200 |
commit | e02643f32e4c97ca307f8fc5b69be79c40d70a3b (patch) | |
tree | b7f6269913cd5a0e4f26a9461a043deb0c168be0 /server/models/request-video-event-interface.ts | |
parent | 65fcc3119c334b75dd13bcfdebf186afdc580a8f (diff) | |
download | PeerTube-e02643f32e4c97ca307f8fc5b69be79c40d70a3b.tar.gz PeerTube-e02643f32e4c97ca307f8fc5b69be79c40d70a3b.tar.zst PeerTube-e02643f32e4c97ca307f8fc5b69be79c40d70a3b.zip |
Type models
Diffstat (limited to 'server/models/request-video-event-interface.ts')
-rw-r--r-- | server/models/request-video-event-interface.ts | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/server/models/request-video-event-interface.ts b/server/models/request-video-event-interface.ts new file mode 100644 index 000000000..a31c7108f --- /dev/null +++ b/server/models/request-video-event-interface.ts | |||
@@ -0,0 +1,26 @@ | |||
1 | import * as Sequelize from 'sequelize' | ||
2 | |||
3 | export namespace RequestVideoEventMethods { | ||
4 | export type CountTotalRequests = (callback) => void | ||
5 | export type ListWithLimitAndRandom = (limitPods, limitRequestsPerPod, callback) => void | ||
6 | export type RemoveByRequestIdsAndPod = (ids, podId, callback) => void | ||
7 | export type RemoveAll = (callback) => void | ||
8 | } | ||
9 | |||
10 | export interface RequestVideoEventClass { | ||
11 | countTotalRequests: RequestVideoEventMethods.CountTotalRequests | ||
12 | listWithLimitAndRandom: RequestVideoEventMethods.ListWithLimitAndRandom | ||
13 | removeByRequestIdsAndPod: RequestVideoEventMethods.RemoveByRequestIdsAndPod | ||
14 | removeAll: RequestVideoEventMethods.RemoveAll | ||
15 | } | ||
16 | |||
17 | export interface RequestVideoEventAttributes { | ||
18 | type: string | ||
19 | count: number | ||
20 | } | ||
21 | |||
22 | export interface RequestVideoEventInstance extends Sequelize.Instance<RequestVideoEventAttributes> { | ||
23 | id: number | ||
24 | } | ||
25 | |||
26 | export interface RequestVideoEventModel extends RequestVideoEventClass, Sequelize.Model<RequestVideoEventInstance, RequestVideoEventAttributes> {} | ||