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

View File

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