@@ -11,7 +11,7 @@ import { UserGroup } from '../entities/UserGroup';
|
||||
import { ResponsePrincipal } from './ResponsePrincipal';
|
||||
|
||||
/**
|
||||
* Defines a user response.
|
||||
* Defines the user response.
|
||||
*/
|
||||
export class ResponseUser extends ResponsePrincipal {
|
||||
/**
|
||||
@@ -22,7 +22,6 @@ export class ResponseUser extends ResponsePrincipal {
|
||||
|
||||
/**
|
||||
* The user's middle name.
|
||||
* Optional.
|
||||
*/
|
||||
@IsString()
|
||||
middlename?: string;
|
||||
@@ -35,52 +34,53 @@ export class ResponseUser extends ResponsePrincipal {
|
||||
|
||||
/**
|
||||
* The user's phone number.
|
||||
* Optional.
|
||||
*/
|
||||
@IsString()
|
||||
phone?: string;
|
||||
|
||||
/**
|
||||
* The user's e-mail address.
|
||||
* Optional.
|
||||
*/
|
||||
@IsString()
|
||||
email?: string;
|
||||
|
||||
/**
|
||||
* The user's username.
|
||||
* Optional.
|
||||
*/
|
||||
@IsString()
|
||||
username?: string;
|
||||
|
||||
/**
|
||||
* is user enabled?
|
||||
* Is user enabled?
|
||||
*/
|
||||
@IsBoolean()
|
||||
enabled: boolean = true;
|
||||
|
||||
/**
|
||||
* profilepic
|
||||
* The user's profile pic.
|
||||
*/
|
||||
@IsString()
|
||||
@IsOptional()
|
||||
profilePic?: string;
|
||||
|
||||
/**
|
||||
* Groups
|
||||
* The groups that the user is a part of.
|
||||
*/
|
||||
@IsArray()
|
||||
@IsOptional()
|
||||
groups: UserGroup[];
|
||||
|
||||
/**
|
||||
* permissions
|
||||
* The user's permissions.
|
||||
*/
|
||||
@IsArray()
|
||||
@IsOptional()
|
||||
permissions: Permission[];
|
||||
|
||||
/**
|
||||
* Creates a ResponseUser object from a user.
|
||||
* @param user The user the response shall be build for.
|
||||
*/
|
||||
public constructor(user: User) {
|
||||
super(user);
|
||||
this.firstname = user.firstname;
|
||||
|
||||
Reference in New Issue
Block a user