diff --git a/src/models/RunnerGroup.ts b/src/models/RunnerGroup.ts new file mode 100644 index 0000000..d5223bb --- /dev/null +++ b/src/models/RunnerGroup.ts @@ -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; +} \ No newline at end of file