]>
Commit | Line | Data |
---|---|---|
e02643f3 C |
1 | import * as Sequelize from 'sequelize' |
2 | ||
ee9e7b61 C |
3 | import { JobState } from '../../../shared/models/job.model' |
4 | ||
e02643f3 | 5 | export namespace JobMethods { |
69818c93 | 6 | export type ListWithLimitCallback = (err: Error, jobInstances: JobInstance[]) => void |
ee9e7b61 | 7 | export type ListWithLimit = (limit: number, state: JobState, callback: ListWithLimitCallback) => void |
e02643f3 C |
8 | } |
9 | ||
10 | export interface JobClass { | |
11 | listWithLimit: JobMethods.ListWithLimit | |
12 | } | |
13 | ||
14 | export interface JobAttributes { | |
ee9e7b61 | 15 | state: JobState |
e02643f3 C |
16 | handlerName: string |
17 | handlerInputData: object | |
18 | } | |
19 | ||
20 | export interface JobInstance extends JobClass, JobAttributes, Sequelize.Instance<JobAttributes> { | |
21 | id: number | |
22 | createdAt: Date | |
23 | updatedAt: Date | |
24 | } | |
25 | ||
26 | export interface JobModel extends JobClass, Sequelize.Model<JobInstance, JobAttributes> {} |