aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/job-interface.ts
blob: ad4e2d2b0e4a8e3abf18fc5e2e71ecead99c867a (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
import * as Sequelize from 'sequelize'

export namespace JobMethods {
  export type ListWithLimit = (limit, state, callback) => void
}

export interface JobClass {
  listWithLimit: JobMethods.ListWithLimit
}

export interface JobAttributes {
  state: string
  handlerName: string
  handlerInputData: object
}

export interface JobInstance extends JobClass, JobAttributes, Sequelize.Instance<JobAttributes> {
  id: number
  createdAt: Date
  updatedAt: Date
}

export interface JobModel extends JobClass, Sequelize.Model<JobInstance, JobAttributes> {}