34 lines
510 B
TypeScript
34 lines
510 B
TypeScript
import {
|
|
IsEAN,
|
|
IsInt,
|
|
IsNotEmpty,
|
|
IsObject,
|
|
IsString
|
|
} from "class-validator";
|
|
import { Runner } from './Runner';
|
|
|
|
/**
|
|
* 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: Runner | null;
|
|
|
|
/**
|
|
* The card's code.
|
|
*/
|
|
@IsEAN()
|
|
@IsString()
|
|
@IsNotEmpty()
|
|
code: string;
|
|
}
|