diff options
Diffstat (limited to 'server/models/job/job-interface.ts')
-rw-r--r-- | server/models/job/job-interface.ts | 33 |
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 @@ | |||
1 | import * as Bluebird from 'bluebird' | ||
2 | import * as Sequelize from 'sequelize' | ||
3 | import { Job as FormattedJob, JobCategory, JobState } from '../../../shared/models/job.model' | ||
4 | import { ResultList } from '../../../shared/models/result-list.model' | ||
5 | |||
6 | export 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 | |||
13 | export interface JobClass { | ||
14 | listWithLimitByCategory: JobMethods.ListWithLimitByCategory | ||
15 | listForApi: JobMethods.ListForApi, | ||
16 | } | ||
17 | |||
18 | export interface JobAttributes { | ||
19 | state: JobState | ||
20 | category: JobCategory | ||
21 | handlerName: string | ||
22 | handlerInputData: any | ||
23 | } | ||
24 | |||
25 | export interface JobInstance extends JobClass, JobAttributes, Sequelize.Instance<JobAttributes> { | ||
26 | id: number | ||
27 | createdAt: Date | ||
28 | updatedAt: Date | ||
29 | |||
30 | toFormattedJSON: JobMethods.ToFormattedJSON | ||
31 | } | ||
32 | |||
33 | export interface JobModel extends JobClass, Sequelize.Model<JobInstance, JobAttributes> {} | ||