Init
This commit is contained in:
39
frontend/src/app/api/dtos/User/CreateUserDto.ts
Normal file
39
frontend/src/app/api/dtos/User/CreateUserDto.ts
Normal file
@@ -0,0 +1,39 @@
|
||||
import type { Nullable, UserRole } from '@/shared';
|
||||
import type { ObjectPermissionDto } from '../Permission/ObjectPermissionDto';
|
||||
|
||||
export class CreateUserDto {
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
email: string;
|
||||
phone: Nullable<string>;
|
||||
password: string;
|
||||
role: UserRole;
|
||||
departmentId: Nullable<number>;
|
||||
position: Nullable<string>;
|
||||
objectPermissions: ObjectPermissionDto[];
|
||||
accessibleUserIds?: Nullable<number[]>;
|
||||
|
||||
constructor({
|
||||
firstName,
|
||||
lastName,
|
||||
email,
|
||||
phone,
|
||||
password,
|
||||
role,
|
||||
departmentId,
|
||||
position,
|
||||
objectPermissions,
|
||||
accessibleUserIds,
|
||||
}: CreateUserDto) {
|
||||
this.firstName = firstName;
|
||||
this.lastName = lastName;
|
||||
this.email = email;
|
||||
this.phone = phone;
|
||||
this.password = password;
|
||||
this.role = role;
|
||||
this.departmentId = departmentId;
|
||||
this.position = position;
|
||||
this.objectPermissions = objectPermissions;
|
||||
this.accessibleUserIds = accessibleUserIds;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user