Implemented the basic request classes feature/1-input_classes #2

Merged
niggl merged 9 commits from feature/1-input_classes into dev 2021-02-03 16:49:23 +00:00
Showing only changes of commit cb7325bbf9 - Show all commits

33
src/models/RunnerCard.ts Normal file
View File

@ -0,0 +1,33 @@
import {
IsEAN,
IsInt,
IsNotEmpty,
IsObject,
IsString
} from "class-validator";
import { ContractRunner } from './ContractRunner';
/**
* Defines the runner card class (used to create runner card pdfs).
*/
export class RunnerCard {
/**
* The cards's id.
*/
@IsInt()
id: number;
/**
* The card's associated runner.
*/
@IsObject()
runner: ContractRunner | null;
/**
* The card's code.
*/
@IsEAN()
@IsString()
@IsNotEmpty()
code: string;
}