26 lines
604 B
TypeScript
26 lines
604 B
TypeScript
import {
|
|
IsArray, IsNumber, IsOptional
|
|
} from "class-validator";
|
|
import { DistanceDonation } from './DistanceDonation';
|
|
import { Runner } from './Runner';
|
|
|
|
/**
|
|
* Defines the certificate runner class (from which the runner certificates get generated).
|
|
*/
|
|
export class CertificateRunner extends Runner {
|
|
/**
|
|
* Array containing all distance donations associated with the runner.
|
|
*/
|
|
@IsArray()
|
|
distanceDonations: DistanceDonation[];
|
|
|
|
@IsNumber()
|
|
@IsOptional()
|
|
donationPerDistanceTotal?: number = 0;
|
|
|
|
@IsNumber()
|
|
@IsOptional()
|
|
donationTotal?: number = 0;
|
|
|
|
}
|