Code + comment cleanup for the response models

ref #39
This commit is contained in:
2020-12-20 19:38:22 +01:00
parent a85d52437b
commit 75332983c2
13 changed files with 83 additions and 91 deletions

View File

@@ -4,16 +4,20 @@ import {
import { Principal } from '../entities/Principal';
/**
* Defines Principal's response class.
* Defines the principal response.
*/
export abstract class ResponsePrincipal {
/**
* Autogenerated unique id (primary key).
* The principal's id.
*/
@IsInt()
id: number;
/**
* Creates a ResponsePrincipal object from a principal.
* @param principal The principal the response shall be build for.
*/
public constructor(principal: Principal) {
this.id = principal.id;
}