diff --git a/api/src/main/java/org/yapp/domain/match/application/MatchService.java b/api/src/main/java/org/yapp/domain/match/application/MatchService.java index 6c1338af..df475840 100644 --- a/api/src/main/java/org/yapp/domain/match/application/MatchService.java +++ b/api/src/main/java/org/yapp/domain/match/application/MatchService.java @@ -13,6 +13,7 @@ import org.yapp.core.auth.AuthenticationService; import org.yapp.core.domain.match.MatchInfo; import org.yapp.core.domain.match.enums.MatchStatus; +import org.yapp.core.domain.profile.ContactType; import org.yapp.core.domain.profile.Profile; import org.yapp.core.domain.profile.ProfileValuePick; import org.yapp.core.domain.profile.ProfileValueTalk; @@ -252,7 +253,7 @@ public void acceptMatch() { } @Transactional(readOnly = true) - public Map getContacts() { + public Map getContacts() { Long userId = authenticationService.getUserId(); MatchInfo matchInfo = getMatchInfo(userId); if (!matchInfo.getUser1Accepted() || !matchInfo.getUser2Accepted()) { diff --git a/api/src/main/java/org/yapp/domain/match/presentation/MatchController.java b/api/src/main/java/org/yapp/domain/match/presentation/MatchController.java index c3edfffa..c93e8afb 100644 --- a/api/src/main/java/org/yapp/domain/match/presentation/MatchController.java +++ b/api/src/main/java/org/yapp/domain/match/presentation/MatchController.java @@ -11,6 +11,7 @@ import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import org.yapp.core.domain.profile.ContactType; import org.yapp.domain.block.application.DirectBlockService; import org.yapp.domain.match.application.MatchService; import org.yapp.domain.match.presentation.dto.response.ContactResponse; @@ -90,7 +91,7 @@ public ResponseEntity> acceptMatch() { @GetMapping("/contacts") @Operation(summary = "매칭 상대 연락처 조회", description = "매칭 상대의 연락처를 조회합니다", tags = {"매칭"}) public ResponseEntity> getContacts() { - Map contacts = matchService.getContacts(); + Map contacts = matchService.getContacts(); ContactResponse contactResponse = new ContactResponse(contacts); return ResponseEntity.status(HttpStatus.OK) .body(CommonResponse.createSuccess(contactResponse)); diff --git a/api/src/main/java/org/yapp/domain/match/presentation/dto/response/ContactResponse.java b/api/src/main/java/org/yapp/domain/match/presentation/dto/response/ContactResponse.java index 5cf5e1e3..8ab44d9e 100644 --- a/api/src/main/java/org/yapp/domain/match/presentation/dto/response/ContactResponse.java +++ b/api/src/main/java/org/yapp/domain/match/presentation/dto/response/ContactResponse.java @@ -4,11 +4,12 @@ import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; +import org.yapp.core.domain.profile.ContactType; @AllArgsConstructor @NoArgsConstructor @Getter public class ContactResponse { - private Map contacts; + private Map contacts; } \ No newline at end of file diff --git a/api/src/main/java/org/yapp/domain/profile/presentation/request/ProfileBasicUpdateRequest.java b/api/src/main/java/org/yapp/domain/profile/presentation/request/ProfileBasicUpdateRequest.java index 3a4db583..0ec88d4c 100644 --- a/api/src/main/java/org/yapp/domain/profile/presentation/request/ProfileBasicUpdateRequest.java +++ b/api/src/main/java/org/yapp/domain/profile/presentation/request/ProfileBasicUpdateRequest.java @@ -6,6 +6,7 @@ import jakarta.validation.constraints.Pattern; import java.time.LocalDate; import java.util.Map; +import org.yapp.core.domain.profile.ContactType; import org.yapp.core.domain.profile.ProfileBasic; public record ProfileBasicUpdateRequest(@NotBlank(message = "닉네임은 비어있을 수 없습니다.") String nickname, @@ -21,7 +22,11 @@ public record ProfileBasicUpdateRequest(@NotBlank(message = "닉네임은 비어 @NotBlank(message = "위치는 비어있을 수 없습니다.") String location, - String smokingStatus, String snsActivityLevel, + @NotBlank(message = "흡연 정보는 비어있을 수 없습니다") + String smokingStatus, + + @NotBlank(message = "SNS 활동 정보는 비어있을 수 없습니다.") + String snsActivityLevel, @Min(value = 1, message = "몸무게는 최소 1kg 이상이어야 합니다.") Integer weight, @@ -32,7 +37,7 @@ public record ProfileBasicUpdateRequest(@NotBlank(message = "닉네임은 비어 @Pattern(regexp = "^https?://.*", message = "이미지 URL은 유효한 형식이어야 합니다.") String imageUrl, - Map contacts) { + Map contacts) { public ProfileBasic toProfileBasic() { return ProfileBasic.builder() diff --git a/api/src/main/java/org/yapp/domain/profile/presentation/request/ProfileCreateRequest.java b/api/src/main/java/org/yapp/domain/profile/presentation/request/ProfileCreateRequest.java index 8495dd0f..414a3915 100644 --- a/api/src/main/java/org/yapp/domain/profile/presentation/request/ProfileCreateRequest.java +++ b/api/src/main/java/org/yapp/domain/profile/presentation/request/ProfileCreateRequest.java @@ -10,6 +10,7 @@ import java.time.LocalDate; import java.util.List; import java.util.Map; +import org.yapp.core.domain.profile.ContactType; public record ProfileCreateRequest( @@ -40,7 +41,7 @@ public record ProfileCreateRequest( @Pattern(regexp = "^(활동|은둔)$", message = "SNS 활동 수준은 '활동', '은둔' 중 하나여야 합니다.") String snsActivityLevel, - Map contacts, + Map contacts, @Pattern(regexp = "\\d{10,11}", message = "유효한 핸드폰 번호를 입력해야 합니다.") String phoneNumber, diff --git a/api/src/main/java/org/yapp/domain/profile/presentation/response/ProfileBasicResponse.java b/api/src/main/java/org/yapp/domain/profile/presentation/response/ProfileBasicResponse.java index 7c0a99b5..e8a74a9e 100644 --- a/api/src/main/java/org/yapp/domain/profile/presentation/response/ProfileBasicResponse.java +++ b/api/src/main/java/org/yapp/domain/profile/presentation/response/ProfileBasicResponse.java @@ -1,6 +1,7 @@ package org.yapp.domain.profile.presentation.response; import java.util.Map; +import org.yapp.core.domain.profile.ContactType; import org.yapp.core.domain.profile.Profile; import org.yapp.core.domain.profile.ProfileBasic; import org.yapp.domain.profile.application.util.DateUtils; @@ -11,7 +12,7 @@ public record ProfileBasicResponse(String nickname, String description, int age, String location, String smokingStatus, Integer weight, String snsActivityLevel, String imageUrl, - Map contacts) { + Map contacts) { public static ProfileBasicResponse from(Profile profile) { diff --git a/core/build.gradle b/core/build.gradle index 6a70d3b3..1d3f554d 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -14,6 +14,7 @@ repositories { subprojects { bootJar.enabled = false + jar.enabled = true } dependencies { diff --git a/core/domain/src/main/java/org/yapp/core/domain/profile/ContactType.java b/core/domain/src/main/java/org/yapp/core/domain/profile/ContactType.java new file mode 100644 index 00000000..52463df4 --- /dev/null +++ b/core/domain/src/main/java/org/yapp/core/domain/profile/ContactType.java @@ -0,0 +1,8 @@ +package org.yapp.core.domain.profile; + +public enum ContactType { + KAKAO_TALK_ID, + OPEN_CHAT_URL, + INSTAGRAM_ID, + PHONE_NUMBER +} diff --git a/core/domain/src/main/java/org/yapp/core/domain/profile/Profile.java b/core/domain/src/main/java/org/yapp/core/domain/profile/Profile.java index efbe20ee..bc831b6c 100644 --- a/core/domain/src/main/java/org/yapp/core/domain/profile/Profile.java +++ b/core/domain/src/main/java/org/yapp/core/domain/profile/Profile.java @@ -43,20 +43,12 @@ public class Profile extends BaseEntity { @Embedded private ProfileBasic profileBasic; - @Embedded - private ProfileBio profileBio; - @OneToMany(mappedBy = "profile", cascade = CascadeType.ALL, orphanRemoval = true) private List profileValueTalks; @OneToMany(mappedBy = "profile", cascade = CascadeType.ALL, orphanRemoval = true) private List profileValuePicks; - @Deprecated - public void updateBio(ProfileBio profileBio) { - this.profileBio = profileBio; - } - public void updateBasic(ProfileBasic profileBasic) { this.profileBasic = profileBasic; } diff --git a/core/domain/src/main/java/org/yapp/core/domain/profile/ProfileBasic.java b/core/domain/src/main/java/org/yapp/core/domain/profile/ProfileBasic.java index 8f120556..1f6d41a2 100644 --- a/core/domain/src/main/java/org/yapp/core/domain/profile/ProfileBasic.java +++ b/core/domain/src/main/java/org/yapp/core/domain/profile/ProfileBasic.java @@ -48,7 +48,7 @@ public class ProfileBasic { @Type(JsonType.class) @Column(columnDefinition = "json") - private Map contacts; + private Map contacts; @Column(name = "image_url") private String imageUrl; diff --git a/infra/build.gradle b/infra/build.gradle index fda8bf58..d13d27e4 100644 --- a/infra/build.gradle +++ b/infra/build.gradle @@ -5,6 +5,15 @@ plugins { group = 'org.yapp' version = '0.0.1-SNAPSHOT' + +bootJar.enabled = false +jar.enabled = true + +subprojects { + bootJar.enabled = false + jar.enabled = true +} + repositories { mavenCentral() }