@@ -1,6 +1,18 @@
|
||||
import {
|
||||
IsInt,
|
||||
|
||||
IsNotEmpty,
|
||||
|
||||
|
||||
|
||||
IsObject,
|
||||
|
||||
|
||||
|
||||
IsOptional,
|
||||
|
||||
IsPositive,
|
||||
|
||||
IsString
|
||||
} from "class-validator";
|
||||
import { RunnerGroup } from './RunnerGroup';
|
||||
@@ -13,24 +25,28 @@ export class Runner {
|
||||
* The runner's id.
|
||||
*/
|
||||
@IsInt()
|
||||
@IsPositive()
|
||||
id: number;
|
||||
|
||||
/**
|
||||
* The runner's first name.
|
||||
*/
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
firstname: string;
|
||||
|
||||
/**
|
||||
* The runner's middle name.
|
||||
*/
|
||||
@IsString()
|
||||
@IsOptional()
|
||||
middlename?: string;
|
||||
|
||||
/**
|
||||
* The runner's last name.
|
||||
*/
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
lastname: string;
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
import { IsInt, IsNotEmpty, IsObject, IsOptional, IsString } from "class-validator";
|
||||
import { IsInt, IsNotEmpty, IsObject, IsOptional, IsPositive, IsString } from "class-validator";
|
||||
|
||||
/**
|
||||
* Defines the runner group class - a simplified version of the backend's ResponseRunnerTeam/-Organization
|
||||
*/
|
||||
export abstract class RunnerGroup {
|
||||
export class RunnerGroup {
|
||||
/**
|
||||
* The group's id.
|
||||
*/
|
||||
@IsInt()
|
||||
@IsNotEmpty()
|
||||
id: number;;
|
||||
@IsPositive()
|
||||
id: number;
|
||||
|
||||
/**
|
||||
* The group's name.
|
||||
|
||||
Reference in New Issue
Block a user