aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/job-interface.ts
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-05-22 20:58:25 +0200
committerChocobozzz <florian.bigard@gmail.com>2017-05-25 17:32:16 +0200
commite02643f32e4c97ca307f8fc5b69be79c40d70a3b (patch)
treeb7f6269913cd5a0e4f26a9461a043deb0c168be0 /server/models/job-interface.ts
parent65fcc3119c334b75dd13bcfdebf186afdc580a8f (diff)
downloadPeerTube-e02643f32e4c97ca307f8fc5b69be79c40d70a3b.tar.gz
PeerTube-e02643f32e4c97ca307f8fc5b69be79c40d70a3b.tar.zst
PeerTube-e02643f32e4c97ca307f8fc5b69be79c40d70a3b.zip
Type models
Diffstat (limited to 'server/models/job-interface.ts')
-rw-r--r--server/models/job-interface.ts23
1 files changed, 23 insertions, 0 deletions
diff --git a/server/models/job-interface.ts b/server/models/job-interface.ts
new file mode 100644
index 000000000..ad4e2d2b0
--- /dev/null
+++ b/server/models/job-interface.ts
@@ -0,0 +1,23 @@
1import * as Sequelize from 'sequelize'
2
3export namespace JobMethods {
4 export type ListWithLimit = (limit, state, callback) => void
5}
6
7export interface JobClass {
8 listWithLimit: JobMethods.ListWithLimit
9}
10
11export interface JobAttributes {
12 state: string
13 handlerName: string
14 handlerInputData: object
15}
16
17export interface JobInstance extends JobClass, JobAttributes, Sequelize.Instance<JobAttributes> {
18 id: number
19 createdAt: Date
20 updatedAt: Date
21}
22
23export interface JobModel extends JobClass, Sequelize.Model<JobInstance, JobAttributes> {}