From 63f952376698c3561754bfb206a64c58c1ae86f1 Mon Sep 17 00:00:00 2001 From: Nicolai Ort Date: Sat, 30 Jan 2021 18:32:28 +0100 Subject: [PATCH] Added input class for contract generation ref #1 --- src/models/ContractRunner.ts | 39 ++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 src/models/ContractRunner.ts diff --git a/src/models/ContractRunner.ts b/src/models/ContractRunner.ts new file mode 100644 index 0000000..eda52f7 --- /dev/null +++ b/src/models/ContractRunner.ts @@ -0,0 +1,39 @@ +import { + IsInt, + IsString +} from "class-validator"; + +/** + * Defines the contract runner class (from which the runner sponsoring contracts get generated). +*/ +export class ContractRunner { + /** + * The runner's id. + */ + @IsInt() + id: number; + + /** + * The runner's first name. + */ + @IsString() + firstname: string; + + /** + * The runner's middle name. + */ + @IsString() + middlename?: string; + + /** + * The runner's last name. + */ + @IsString() + lastname: string; + + /** + * The runner's group. + */ + @IsString() + group: string; +}