@@ -1,24 +1,19 @@
|
||||
import {
|
||||
IsArray,
|
||||
IsBoolean,
|
||||
IsInt,
|
||||
|
||||
IsOptional,
|
||||
IsString
|
||||
} from "class-validator";
|
||||
import { Permission } from '../entities/Permission';
|
||||
import { User } from '../entities/User';
|
||||
import { UserGroup } from '../entities/UserGroup';
|
||||
import { ResponsePrincipal } from './ResponsePrincipal';
|
||||
|
||||
/**
|
||||
* Defines a user response.
|
||||
*/
|
||||
export class ResponseUser {
|
||||
/**
|
||||
* Autogenerated unique id (primary key).
|
||||
*/
|
||||
@IsInt()
|
||||
id: number;;
|
||||
|
||||
export class ResponseUser extends ResponsePrincipal {
|
||||
/**
|
||||
* The user's first name.
|
||||
*/
|
||||
@@ -80,7 +75,7 @@ export class ResponseUser {
|
||||
permissions: Permission[];
|
||||
|
||||
public constructor(user: User) {
|
||||
this.id = user.id;
|
||||
super(user);
|
||||
this.firstname = user.firstname;
|
||||
this.middlename = user.middlename;
|
||||
this.lastname = user.lastname;
|
||||
|
||||
Reference in New Issue
Block a user