55
src/models/responses/ResponseRunnerGroup.ts
Normal file
55
src/models/responses/ResponseRunnerGroup.ts
Normal file
@@ -0,0 +1,55 @@
|
||||
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.
|
||||
*/
|
||||
export abstract class ResponseRunnerGroup {
|
||||
/**
|
||||
* Autogenerated unique id (primary key).
|
||||
*/
|
||||
@IsInt()
|
||||
@IsNotEmpty()
|
||||
id: number;;
|
||||
|
||||
/**
|
||||
* The groups's name.
|
||||
*/
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
name: string;
|
||||
|
||||
|
||||
/**
|
||||
* The group's contact.
|
||||
* Optional.
|
||||
*/
|
||||
@IsObject()
|
||||
@IsOptional()
|
||||
contact?: GroupContact;
|
||||
|
||||
public constructor(group: RunnerGroup) {
|
||||
this.id = group.id;
|
||||
this.name = group.name;
|
||||
this.contact = group.contact;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user