@@ -1,38 +1,20 @@
|
||||
import {
|
||||
IsInt,
|
||||
|
||||
|
||||
|
||||
IsNotEmpty,
|
||||
|
||||
|
||||
|
||||
IsObject,
|
||||
|
||||
|
||||
|
||||
IsOptional,
|
||||
|
||||
|
||||
|
||||
IsString
|
||||
} from "class-validator";
|
||||
import { IsInt, IsNotEmpty, IsObject, IsOptional, IsString } from "class-validator";
|
||||
import { GroupContact } from '../entities/GroupContact';
|
||||
import { RunnerGroup } from '../entities/RunnerGroup';
|
||||
|
||||
/**
|
||||
* Defines a track of given length.
|
||||
* Defines the runnerGroup response.
|
||||
*/
|
||||
export abstract class ResponseRunnerGroup {
|
||||
/**
|
||||
* Autogenerated unique id (primary key).
|
||||
* The runnerGroup's id.
|
||||
*/
|
||||
@IsInt()
|
||||
@IsNotEmpty()
|
||||
id: number;;
|
||||
|
||||
/**
|
||||
* The groups's name.
|
||||
* The runnerGroup's name.
|
||||
*/
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
@@ -40,13 +22,16 @@ export abstract class ResponseRunnerGroup {
|
||||
|
||||
|
||||
/**
|
||||
* The group's contact.
|
||||
* Optional.
|
||||
* The runnerGroup's contact.
|
||||
*/
|
||||
@IsObject()
|
||||
@IsOptional()
|
||||
contact?: GroupContact;
|
||||
|
||||
/**
|
||||
* Creates a ResponseRunnerGroup object from a runnerGroup.
|
||||
* @param group The runnerGroup the response shall be build for.
|
||||
*/
|
||||
public constructor(group: RunnerGroup) {
|
||||
this.id = group.id;
|
||||
this.name = group.name;
|
||||
|
||||
Reference in New Issue
Block a user