Added a basic donor class

ref #1
This commit is contained in:
Nicolai Ort 2021-02-02 09:09:10 +01:00
parent 1d73e4ed9c
commit cfa65e83ca
2 changed files with 38 additions and 1 deletions

37
src/models/Donor.ts Normal file
View File

@ -0,0 +1,37 @@
import {
IsInt,
IsString
} from "class-validator";
/**
* Defines the Donor class.
*/
export class Donor {
/**
* The donor's id.
*/
@IsInt()
id: number;
/**
* The donor's first name.
*/
@IsString()
firstname: string;
/**
* The donor's middle name.
*/
@IsString()
middlename?: string;
/**
* The donor's last name.
*/
@IsString()
lastname: string;
}

View File

@ -6,7 +6,7 @@ import {
import { RunnerGroup } from './RunnerGroup';
/**
* Defines the contract runner class (from which the runner sponsoring contracts get generated).
* Defines the runner class (from which the runner sponsoring contracts get generated).
*/
export class Runner {
/**