Added a runnercard class

ref #1
This commit is contained in:
Nicolai Ort 2021-02-02 08:49:41 +01:00
parent e29c17a29a
commit cb7325bbf9
1 changed files with 33 additions and 0 deletions

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;
}