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