Добавлено разделение имени пользователя на ФАМИЛИЮ ИМЯ и ОТЧЕСТВО
This commit is contained in:
parent
70f627a694
commit
e071807ecf
@ -28,7 +28,11 @@ public class Employee {
|
||||
private String password;
|
||||
|
||||
@NonNull
|
||||
private String name;
|
||||
private String firstName;
|
||||
@NonNull
|
||||
private String lastName;
|
||||
@NonNull
|
||||
private String patronymic;
|
||||
@NonNull
|
||||
private String photo;
|
||||
@NonNull
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.example.onomatopoeiaback.domain.employee;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.NonNull;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@ -8,7 +9,9 @@ import lombok.Setter;
|
||||
public class EmployeeDTO {
|
||||
private String login;
|
||||
private String password;
|
||||
private String name;
|
||||
private String firstName;
|
||||
private String lastName;
|
||||
private String patronymic;
|
||||
private String photo;
|
||||
private PositionType position;
|
||||
}
|
||||
|
@ -23,7 +23,9 @@ public class EmployeeService {
|
||||
Employee employee = new Employee();
|
||||
employee.setLogin(employeeDTO.getLogin());
|
||||
employee.setPassword(passwordEncoder.encode(employeeDTO.getPassword()));
|
||||
employee.setName(employeeDTO.getName());
|
||||
employee.setFirstName(employeeDTO.getFirstName());
|
||||
employee.setLastName(employeeDTO.getLastName());
|
||||
employee.setPatronymic(employeeDTO.getPatronymic());
|
||||
employee.setPhoto(employeeDTO.getPhoto());
|
||||
employee.setPosition(employeeDTO.getPosition());
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user