diff --git a/be/src/main/java/yeonba/be/login/dto/request/UserJoinRequest.java b/be/src/main/java/yeonba/be/login/dto/request/UserJoinRequest.java index 3ef914a9..cdc48993 100644 --- a/be/src/main/java/yeonba/be/login/dto/request/UserJoinRequest.java +++ b/be/src/main/java/yeonba/be/login/dto/request/UserJoinRequest.java @@ -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 = "닉네임", @@ -125,6 +118,7 @@ public class UserJoinRequest { type = "array", description = "프로필 사진 파일들") @Size(min = 2, max = 2) + @NotNull(message = "프로필 사진은 반드시 2장이어야 합니다.") private List profilePhotos; @Schema( diff --git a/be/src/main/java/yeonba/be/mypage/dto/response/BlockedUserResponse.java b/be/src/main/java/yeonba/be/mypage/dto/response/BlockedUserResponse.java index edc15170..da9a4a86 100644 --- a/be/src/main/java/yeonba/be/mypage/dto/response/BlockedUserResponse.java +++ b/be/src/main/java/yeonba/be/mypage/dto/response/BlockedUserResponse.java @@ -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(); } } diff --git a/be/src/main/java/yeonba/be/mypage/dto/response/UserProfileDetailResponse.java b/be/src/main/java/yeonba/be/mypage/dto/response/UserProfileDetailResponse.java index 397e4ff8..9b283d90 100644 --- a/be/src/main/java/yeonba/be/mypage/dto/response/UserProfileDetailResponse.java +++ b/be/src/main/java/yeonba/be/mypage/dto/response/UserProfileDetailResponse.java @@ -23,12 +23,6 @@ public class UserProfileDetailResponse { example = "남") private String gender; - @Schema( - type = "string", - description = "이름", - example = "안민재") - private String name; - @Schema( type = "string", description = "생년월일", @@ -82,7 +76,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(); diff --git a/be/src/main/java/yeonba/be/mypage/service/MyPageService.java b/be/src/main/java/yeonba/be/mypage/service/MyPageService.java index ac1f69a5..c1172459 100644 --- a/be/src/main/java/yeonba/be/mypage/service/MyPageService.java +++ b/be/src/main/java/yeonba/be/mypage/service/MyPageService.java @@ -59,7 +59,7 @@ public UserSimpleProfileResponse getSimpleProfile(long userId) { User user = userQuery.findById(userId); return new UserSimpleProfileResponse( - user.getName(), + user.getNickname(), user.getRepresentativeProfilePhoto(), user.getArrow() ); diff --git a/be/src/main/java/yeonba/be/user/entity/User.java b/be/src/main/java/yeonba/be/user/entity/User.java index 731c8e39..99eb4fc9 100644 --- a/be/src/main/java/yeonba/be/user/entity/User.java +++ b/be/src/main/java/yeonba/be/user/entity/User.java @@ -47,9 +47,6 @@ public class User { private boolean gender; - @Column(nullable = false) - private String name; - @Column(nullable = false) private String nickname; @@ -107,7 +104,6 @@ public User( long socialId, LoginType loginType, boolean gender, - String name, String nickname, LocalDate birth, int age, @@ -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; @@ -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; diff --git a/be/src/main/java/yeonba/be/user/service/UserService.java b/be/src/main/java/yeonba/be/user/service/UserService.java index 0e943b60..23e48ac4 100644 --- a/be/src/main/java/yeonba/be/user/service/UserService.java +++ b/be/src/main/java/yeonba/be/user/service/UserService.java @@ -105,7 +105,6 @@ public User saveUser(UserJoinRequest request) { request.getSocialId(), loginType, gender.genderBoolean, - request.getName(), request.getNickname(), request.getBirth(), age, diff --git a/be/src/main/resources/application.yml b/be/src/main/resources/application.yml index 7ce0b78e..e8db33a9 100644 --- a/be/src/main/resources/application.yml +++ b/be/src/main/resources/application.yml @@ -11,5 +11,5 @@ spring: jpa: properties: hibernate: - show_sql: true - format_sql: true \ No newline at end of file + show_sql: false + format_sql: false \ No newline at end of file