@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user