Skip to content

Commit

Permalink
refactor: 어노테이션 변경 및 불필요한 필드 설정 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
yeonjae02 committed Aug 2, 2024
1 parent 161e1fa commit 8d44fdc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import com.solucitation.midpoint_backend.domain.member.entity.Member;
import jakarta.persistence.*;
import lombok.*;
import org.hibernate.annotations.CreationTimestamp;
import org.hibernate.annotations.UpdateTimestamp;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.transaction.annotation.Transactional;
Expand Down Expand Up @@ -36,11 +38,11 @@ public class Post {
@Column(nullable = false, columnDefinition = "text")
private String content;

@CreatedDate
@CreationTimestamp
@Column(name="create_date", nullable = false, updatable = false)
private LocalDateTime createDate;

@LastModifiedDate
@UpdateTimestamp
@Column(name="update_date")
private LocalDateTime updateDate;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,6 @@ public void createPost(PostRequestDto postRequestDto, Member member, List<Multip
.member(member)
.title(postRequestDto.getTitle())
.content(postRequestDto.getContent())
.createDate(time)
.updateDate(time)
.postHashtags(postHashtags)
.images(images)
.build();
Expand Down

0 comments on commit 8d44fdc

Please sign in to comment.