From da86f911dd2a93e9b38d50334755bf2d05fbfe7d Mon Sep 17 00:00:00 2001 From: WonyuChoi Date: Tue, 16 Jul 2024 21:43:13 +0900 Subject: [PATCH] =?UTF-8?q?FLASH-164=20fix:=20solution=EC=9D=98=20problemI?= =?UTF-8?q?d=20=ED=83=80=EC=9E=85=20UUID=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../first/flash/climbing/solution/domain/Solution.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/first/flash/climbing/solution/domain/Solution.java b/src/main/java/com/first/flash/climbing/solution/domain/Solution.java index ac87272f..50ecb8cd 100644 --- a/src/main/java/com/first/flash/climbing/solution/domain/Solution.java +++ b/src/main/java/com/first/flash/climbing/solution/domain/Solution.java @@ -2,10 +2,12 @@ import com.first.flash.climbing.solution.domain.dto.SolutionCreateRequestDto; import com.first.flash.climbing.solution.domain.vo.SolutionDetail; +import jakarta.persistence.Column; import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; import jakarta.persistence.GenerationType; import jakarta.persistence.Id; +import java.util.UUID; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; @@ -23,10 +25,11 @@ public class Solution { private Long id; SolutionDetail solutionDetail; private Long optionalWeight; - private Long problemId; + @Column(columnDefinition = "BINARY(16)") + private UUID problemId; protected Solution(final String uploader, final String review, final String instagramId, - final String videoUrl, final Long problemId) { + final String videoUrl, final UUID problemId) { this.solutionDetail = SolutionDetail.of(uploader, review, instagramId, videoUrl); this.optionalWeight = DEFAULT_OPTIONAL_WEIGHT; @@ -34,7 +37,7 @@ protected Solution(final String uploader, final String review, final String inst } public static Solution of(final SolutionCreateRequestDto createRequestDto, - final Long problemId) { + final UUID problemId) { return new Solution(createRequestDto.uploader(), createRequestDto.review(), createRequestDto.instagramId(), createRequestDto.videoUrl(), problemId);