diff --git a/src/tasks/job.ts b/src/tasks/job.ts index c74af97..d5d85fa 100644 --- a/src/tasks/job.ts +++ b/src/tasks/job.ts @@ -2,7 +2,7 @@ interface JobConstructorOpts { id: number source: string lang: string - scenario: "run" | "submit" + scenario: "run" | "submit" |"project" timelimit?: number } interface RunJobConstructorOpts extends JobConstructorOpts { @@ -16,6 +16,11 @@ interface TestcaseOpts { interface SubmitJobConstructorOpts extends JobConstructorOpts { testcases: Array } +interface ProjectConstructorOpts extends JobConstructorOpts { + problem: string + problem : submissionDirs +} + export class Job { id: number @@ -50,3 +55,12 @@ export class SubmitJob extends Job { this.testcases = testcases } } +export class ProjectJob extends Job { + problem: string + problem: submissionDirs + + constructor({ id, source, lang, timelimit, scenario, problem}: ProjectConstructorOpts) { + super({ id, source, lang, timelimit, scenario}) + this.problem = problem + } +} \ No newline at end of file