diff options
Diffstat (limited to 'server/models/job-interface.ts')
-rw-r--r-- | server/models/job-interface.ts | 23 |
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 @@ | |||
1 | import * as Sequelize from 'sequelize' | ||
2 | |||
3 | export namespace JobMethods { | ||
4 | export type ListWithLimit = (limit, state, callback) => void | ||
5 | } | ||
6 | |||
7 | export interface JobClass { | ||
8 | listWithLimit: JobMethods.ListWithLimit | ||
9 | } | ||
10 | |||
11 | export interface JobAttributes { | ||
12 | state: string | ||
13 | handlerName: string | ||
14 | handlerInputData: object | ||
15 | } | ||
16 | |||
17 | export interface JobInstance extends JobClass, JobAttributes, Sequelize.Instance<JobAttributes> { | ||
18 | id: number | ||
19 | createdAt: Date | ||
20 | updatedAt: Date | ||
21 | } | ||
22 | |||
23 | export interface JobModel extends JobClass, Sequelize.Model<JobInstance, JobAttributes> {} | ||