aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/job/job-interface.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/models/job/job-interface.ts')
-rw-r--r--server/models/job/job-interface.ts33
1 files changed, 0 insertions, 33 deletions
diff --git a/server/models/job/job-interface.ts b/server/models/job/job-interface.ts
deleted file mode 100644
index 3cfc0fbed..000000000
--- a/server/models/job/job-interface.ts
+++ /dev/null
@@ -1,33 +0,0 @@
1import * as Bluebird from 'bluebird'
2import * as Sequelize from 'sequelize'
3import { Job as FormattedJob, JobCategory, JobState } from '../../../shared/models/job.model'
4import { ResultList } from '../../../shared/models/result-list.model'
5
6export namespace JobMethods {
7 export type ListWithLimitByCategory = (limit: number, state: JobState, category: JobCategory) => Bluebird<JobInstance[]>
8 export type ListForApi = (start: number, count: number, sort: string) => Bluebird< ResultList<JobInstance> >
9
10 export type ToFormattedJSON = (this: JobInstance) => FormattedJob
11}
12
13export interface JobClass {
14 listWithLimitByCategory: JobMethods.ListWithLimitByCategory
15 listForApi: JobMethods.ListForApi,
16}
17
18export interface JobAttributes {
19 state: JobState
20 category: JobCategory
21 handlerName: string
22 handlerInputData: any
23}
24
25export interface JobInstance extends JobClass, JobAttributes, Sequelize.Instance<JobAttributes> {
26 id: number
27 createdAt: Date
28 updatedAt: Date
29
30 toFormattedJSON: JobMethods.ToFormattedJSON
31}
32
33export interface JobModel extends JobClass, Sequelize.Model<JobInstance, JobAttributes> {}