Commit 9ddefda2 authored by Chamod Ishankha's avatar Chamod Ishankha

add dob to user dto

parent 08d23468
......@@ -5,6 +5,8 @@ import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.time.LocalDate;
@Data
@AllArgsConstructor
@NoArgsConstructor
......@@ -16,4 +18,5 @@ public class UserDto {
private String phone;
private String role;
private String status;
private LocalDate dob;
}
......@@ -8,6 +8,7 @@ import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;
import java.time.LocalDate;
import java.util.Collection;
import java.util.List;
......@@ -29,6 +30,7 @@ public class User implements UserDetails {
private String phone;
private String role;
private String status;
private LocalDate dob;
@Override
public Collection<? extends GrantedAuthority> getAuthorities() {
......
......@@ -154,6 +154,7 @@ public class UserServiceImpl implements UserService {
user.setFirstName(userDto.getFirstName());
user.setLastName(userDto.getLastName());
user.setPhone(userDto.getPhone());
user.setDob(userDto.getDob());
return userMapper.toDto(userDao.save(user));
}
} catch (Exception e) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment