Page 474 - MDP2022-3
P. 474
@Column(name = "commentId")
@GeneratedValue(strategy = GenerationType.IDENTITY)
Long commentId;
@Column(nullable = false, columnDefinition = "TEXT")
private String comment;
@Column(name = "createdDate")
private LocalDateTime commentCreateTime;
@Column(name = "updateDate")
private LocalDateTime commentUpdateTime;
@ManyToOne
@JoinColumn(name = "reportId")
private Report report;
@ManyToOne
@JoinColumn(name = "userInfoId")
private UserInfo userInfo;
@PrePersist
public void CommentCreatedDate() {
this.commentCreateTime = LocalDateTime.now();
}
public void CommentUpdatedDate() {
this.commentUpdateTime = LocalDateTime.now();
}
}
com.webmister.semicolon.domain.FriendMatch
import com.fasterxml.jackson.annotation.JsonBackReference;
import com.webmister.semicolon.enumclass.FriendStatus;
import lombok.*;
import javax.persistence.*;
@Entity
@Builder
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
public class FriendMatch {