@Entity
@Getter
@NoArgsConstructor(access = AccessLevel.PROTECTED)
public class StudyNoticeComment {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@ManyToOne
private StudyNotice studyNotice;
@ManyToOne
private User user;
private String content;
private final OffsetDateTime createAt = OffsetDateTime.now();
@Enumerated(STRING)
private StudyNoticeCommentStatus status = CREATED;
EnumType.STRING : 각 Enum 이름을 컬럼에 저장한다. ex) create, deleted
EnumType.ORDINAL : 각 Enum에 대응되는 순서를 칼럼에 저장한다. ex) 0, 1, 2.