Skip to content

Commit

Permalink
[FIX] 피드 엔티티 생성 시 생성,수정 시간 저장 방식 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
ChaeAg committed Sep 27, 2024
1 parent 3cb8839 commit a48d7bd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/main/java/org/websoso/WSSServer/domain/Feed.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.CreationTimestamp;
import org.hibernate.annotations.DynamicInsert;
import org.websoso.WSSServer.domain.common.Action;
import org.websoso.WSSServer.exception.exception.CustomUserException;
Expand Down Expand Up @@ -48,11 +47,9 @@ public class Feed {
@Column(nullable = false)
private Boolean isSpoiler;

@CreationTimestamp
@Column(nullable = false)
private LocalDateTime createdDate;

@CreationTimestamp
@Column(nullable = false)
private LocalDateTime modifiedDate;

Expand All @@ -78,6 +75,8 @@ public Feed(String feedContent, Boolean isSpoiler, Long novelId, User user) {
this.isSpoiler = isSpoiler;
this.novelId = novelId;
this.user = user;
this.createdDate = LocalDateTime.now();
this.modifiedDate = this.createdDate;
}

public void updateFeed(String feedContent, Boolean isSpoiler, Long novelId) {
Expand Down

0 comments on commit a48d7bd

Please sign in to comment.