Skip to content

Commit

Permalink
fix: 사용자 엔티티에서 name 필드 삭제
Browse files Browse the repository at this point in the history
  • Loading branch information
acceptor-gyu committed May 7, 2024
1 parent 1cf7844 commit 9fa973b
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,6 @@ public class UserJoinRequest {
@NotNull(message = "생년월일은 반드시 입력되어야 합니다.")
private LocalDate birth;

@Schema(
type = "string",
description = "이름",
example = "안민재")
@NotBlank(message = " 이름은 반드시 입력되어야 합니다.")
private String name;

@Schema(
type = "string",
description = "닉네임",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ public class BlockedUserResponse {
type = "string",
description = "사용자 이름",
example = "안민재")
private String name;
private String nickname;

public BlockedUserResponse(User blockedUser) {

this.id = blockedUser.getId();
this.profileUrl = blockedUser.getRepresentativeProfilePhoto();
this.name = blockedUser.getName();
this.nickname = blockedUser.getNickname();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,6 @@ public class UserProfileDetailResponse {
example = "남")
private String gender;

@Schema(
type = "string",
description = "이름",
example = "안민재")
private String name;

@Schema(
type = "string",
description = "생년월일",
Expand Down Expand Up @@ -88,7 +82,6 @@ public UserProfileDetailResponse(User user) {

this.profilePhotoUrls = user.getProfilePhotoUrls();
this.gender = user.getGender();
this.name = user.getName();
this.birth = user.getBirth();
this.height = user.getHeight();
this.phoneNumber = user.getPhoneNumber();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public UserSimpleProfileResponse getSimpleProfile(long userId) {
User user = userQuery.findById(userId);

return new UserSimpleProfileResponse(
user.getName(),
user.getNickname(),
user.getRepresentativeProfilePhoto(),
user.getArrow()
);
Expand Down
6 changes: 0 additions & 6 deletions be/src/main/java/yeonba/be/user/entity/User.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@ public class User {

private boolean gender;

@Column(nullable = false)
private String name;

@Column(nullable = false)
private String nickname;

Expand Down Expand Up @@ -107,7 +104,6 @@ public User(
long socialId,
LoginType loginType,
boolean gender,
String name,
String nickname,
LocalDate birth,
int age,
Expand All @@ -125,7 +121,6 @@ public User(
this.socialId = socialId;
this.loginType = loginType;
this.gender = gender;
this.name = name;
this.nickname = nickname;
this.birth = birth;
this.age = age;
Expand Down Expand Up @@ -153,7 +148,6 @@ public void validateNotSameUser(User user) {
public void delete() {

this.deleted = true;
this.name = "deleted";
this.nickname = "deleted";
this.age = 0;
this.height = 0;
Expand Down
1 change: 0 additions & 1 deletion be/src/main/java/yeonba/be/user/service/UserService.java
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ public User saveUser(UserJoinRequest request) {
request.getSocialId(),
loginType,
gender.genderBoolean,
request.getName(),
request.getNickname(),
request.getBirth(),
age,
Expand Down

0 comments on commit 9fa973b

Please sign in to comment.