From 9c0ef7c3f3d0c20c7e978d510b0338678d6da66e Mon Sep 17 00:00:00 2001 From: yang Jiyoung <0112jyoung@naver.com> Date: Mon, 11 Nov 2024 10:39:22 +0900 Subject: [PATCH 1/2] =?UTF-8?q?[FIX]=20=EC=86=8C=EC=9B=90=20=EC=83=9D?= =?UTF-8?q?=EC=84=B1=20=EC=8B=9C=20=ED=9E=8C=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/sopterm/makeawish/domain/wish/Wish.java | 4 +++- .../java/com/sopterm/makeawish/dto/wish/WishRequestDTO.java | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/sopterm/makeawish/domain/wish/Wish.java b/src/main/java/com/sopterm/makeawish/domain/wish/Wish.java index 0c0c18b..6d105f2 100644 --- a/src/main/java/com/sopterm/makeawish/domain/wish/Wish.java +++ b/src/main/java/com/sopterm/makeawish/domain/wish/Wish.java @@ -39,6 +39,7 @@ public class Wish extends BaseEntity { private LocalDateTime endAt; private int totalPrice; + private String hint; @ManyToOne(fetch = LAZY) @JoinColumn(name = "user_id") @@ -51,13 +52,14 @@ public class Wish extends BaseEntity { @Builder public Wish(String title, String presentImageUrl, LocalDateTime startAt, - LocalDateTime endAt, User wisher, boolean wantsGift) { + LocalDateTime endAt, User wisher, boolean wantsGift, String hint) { this.title = title; this.presentImageUrl = presentImageUrl; this.startAt = startAt; this.endAt = endAt; this.totalPrice = 0; this.wantsGift = wantsGift; + this.hint = hint; setWisher(wisher); } diff --git a/src/main/java/com/sopterm/makeawish/dto/wish/WishRequestDTO.java b/src/main/java/com/sopterm/makeawish/dto/wish/WishRequestDTO.java index 5ad3201..62546e8 100644 --- a/src/main/java/com/sopterm/makeawish/dto/wish/WishRequestDTO.java +++ b/src/main/java/com/sopterm/makeawish/dto/wish/WishRequestDTO.java @@ -11,13 +11,15 @@ public record WishRequestDTO( String startDate, String endDate, String phone, - boolean wantsGift + boolean wantsGift, + String hint ) { public Wish toEntity(User wisher) { wisher.updatePhoneNumber(phone); return Wish.builder() .presentImageUrl(imageUrl) + .hint(hint) .title(title) .startAt(convertToDate(startDate)) .endAt(convertToDate(endDate)) From 0abf1700b079cdb6515a6988a93482fc5b1ede0a Mon Sep 17 00:00:00 2001 From: yang Jiyoung <0112jyoung@naver.com> Date: Mon, 11 Nov 2024 10:39:31 +0900 Subject: [PATCH 2/2] =?UTF-8?q?[FIX]=20=EC=86=8C=EC=9B=90=20=EC=A1=B0?= =?UTF-8?q?=ED=9A=8C=20=EC=8B=9C=20=ED=9E=8C=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/sopterm/makeawish/dto/wish/WishResponseDTO.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/com/sopterm/makeawish/dto/wish/WishResponseDTO.java b/src/main/java/com/sopterm/makeawish/dto/wish/WishResponseDTO.java index b74d3f0..62c2c6d 100644 --- a/src/main/java/com/sopterm/makeawish/dto/wish/WishResponseDTO.java +++ b/src/main/java/com/sopterm/makeawish/dto/wish/WishResponseDTO.java @@ -32,6 +32,7 @@ public static WishResponseDTO from(Wish wish) { .bank(bank) .dayCount(getRemainDayCount(wish.getEndAt())) .title(wish.getTitle()) + .hint(wish.getHint()) .wantsGift(wish.isWantsGift()) .presentImageUrl(wish.getPresentImageUrl()) .build();