Runners now use the runnergroup class instead of strings

ref #1
This commit is contained in:
Nicolai Ort 2021-02-02 08:50:31 +01:00
parent cb7325bbf9
commit aae4f507ea
2 changed files with 7 additions and 5 deletions

View File

@ -1,12 +1,14 @@
import { import {
IsInt, IsInt,
IsObject,
IsString IsString
} from "class-validator"; } from "class-validator";
import { RunnerGroup } from './RunnerGroup';
/** /**
* Defines the contract runner class (from which the runner sponsoring contracts get generated). * Defines the contract runner class (from which the runner sponsoring contracts get generated).
*/ */
export class ContractRunner { export class Runner {
/** /**
* The runner's id. * The runner's id.
*/ */
@ -34,6 +36,6 @@ export class ContractRunner {
/** /**
* The runner's group. * The runner's group.
*/ */
@IsString() @IsObject()
group: string; group: RunnerGroup;
} }

View File

@ -5,7 +5,7 @@ import {
IsObject, IsObject,
IsString IsString
} from "class-validator"; } from "class-validator";
import { ContractRunner } from './ContractRunner'; import { Runner } from './Runner';
/** /**
* Defines the runner card class (used to create runner card pdfs). * Defines the runner card class (used to create runner card pdfs).
@ -21,7 +21,7 @@ export class RunnerCard {
* The card's associated runner. * The card's associated runner.
*/ */
@IsObject() @IsObject()
runner: ContractRunner | null; runner: Runner | null;
/** /**
* The card's code. * The card's code.