Added Runnergroup abstract class

ref #11
This commit is contained in:
Nicolai Ort 2020-12-01 17:27:18 +01:00
parent f8e1bf715b
commit f999c416c4

38
src/models/RunnerGroup.ts Normal file
View File

@ -0,0 +1,38 @@
import { Entity, PrimaryGeneratedColumn, Column } from "typeorm";
import {
IsEmail,
IsInt,
IsNotEmpty,
IsOptional,
IsPhoneNumber,
IsString,
} from "class-validator";
/**
* Defines the runnerGroup interface.
*/
export abstract class RunnerGroup {
/**
* Autogenerated unique id (primary key).
*/
@PrimaryGeneratedColumn()
@IsOptional()
@IsInt()
id: number;
/**
* The group's first name.
*/
@Column()
@IsNotEmpty()
@IsString()
name: string;
/**
* The participant's middle name.
* Optional
*/
@Column()
@IsOptional()
contact?: GroupContact;
}