Skip to content

Commit

Permalink
NABI-102-refsctor : 범모님 review comment 반영
Browse files Browse the repository at this point in the history
  • Loading branch information
born-A committed Nov 1, 2023
1 parent 61c135d commit 884d515
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,16 @@ public class UserResponseDTO {

private final Role role;

private final LocalDateTime createdDate;

private final LocalDateTime modifiedDate;

public UserResponseDTO(User user) {
this.userId = user.getUserId();
this.accountId = user.getAccountId();
this.nickName = user.getNickname();
this.role = user.getRole();
this.createdDate = user.getCreatedDate();
this.modifiedDate = user.getModifiedDate();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,12 @@ public class User extends BaseEntity implements UserDetails {
@Column(name = "user_role")
private Role role;

public User(String accountId, String nickname, String profileImageUrl, Role role) {
super();
private User(
String accountId,
String nickname,
String profileImageUrl,
Role role
) {
}

public void updateNickname(String nickname) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
@Repository
public interface UserRepository extends JpaRepository<User, Long> {
Optional<User> findByNickname(String name);

Optional<User> findByEmail(String email);

Optional<User> findByAccountIdAndProvider(String accountId, String provider);

Optional<User> findByAccountId(String oauthId);
Expand Down

0 comments on commit 884d515

Please sign in to comment.