Skip to content

Commit

Permalink
fix: dto, entity 필드 형식 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
SunYerim committed Jul 6, 2024
1 parent 74fc735 commit 2381621
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import lombok.RequiredArgsConstructor;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;

@RequiredArgsConstructor
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/com/sunjoo/drinktionary/entity/Review.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ 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")
private Drink drink;

@PrePersist
protected void onCreate() {
this.createAt = LocalDateTime.now();
this.createAt = LocalDate.now();
}

public void updateContent(final String content) {
Expand All @@ -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;
}

Expand Down

0 comments on commit 2381621

Please sign in to comment.