diff --git a/src/models/RunnerCard.ts b/src/models/RunnerCard.ts new file mode 100644 index 0000000..89f2687 --- /dev/null +++ b/src/models/RunnerCard.ts @@ -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; +}