From 2381621cc1102d9a0859cd2a78a4521b7e553603 Mon Sep 17 00:00:00 2001 From: SunYerim Date: Sat, 6 Jul 2024 21:38:03 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20dto,=20entity=20=ED=95=84=EB=93=9C=20?= =?UTF-8?q?=ED=98=95=EC=8B=9D=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/sunjoo/drinktionary/dto/ReviewResponse.java | 1 + src/main/java/com/sunjoo/drinktionary/entity/Review.java | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/sunjoo/drinktionary/dto/ReviewResponse.java b/src/main/java/com/sunjoo/drinktionary/dto/ReviewResponse.java index 0cdc866..58efe31 100644 --- a/src/main/java/com/sunjoo/drinktionary/dto/ReviewResponse.java +++ b/src/main/java/com/sunjoo/drinktionary/dto/ReviewResponse.java @@ -7,6 +7,7 @@ import lombok.RequiredArgsConstructor; import java.time.LocalDate; +import java.time.LocalDateTime; import java.util.Date; @RequiredArgsConstructor diff --git a/src/main/java/com/sunjoo/drinktionary/entity/Review.java b/src/main/java/com/sunjoo/drinktionary/entity/Review.java index 176e6bb..d61926c 100644 --- a/src/main/java/com/sunjoo/drinktionary/entity/Review.java +++ b/src/main/java/com/sunjoo/drinktionary/entity/Review.java @@ -33,7 +33,7 @@ public class Review { private String content; @Column(name = "create_at", updatable = false, columnDefinition = "TIMESTAMP") - private LocalDateTime createAt; + private LocalDate createAt; @ManyToOne @JoinColumn(name = "drink_id") @@ -41,7 +41,7 @@ public class Review { @PrePersist protected void onCreate() { - this.createAt = LocalDateTime.now(); + this.createAt = LocalDate.now(); } public void updateContent(final String content) { @@ -52,7 +52,7 @@ public void updateRating(final double rating) { this.starRating = rating; } - public void updateDate(final LocalDateTime date) { + public void updateDate(final LocalDate date) { this.createAt = date; }