Reply
페이지 정보
본문
package web.domain;
import jakarta.persistence.Entity;
import jakarta.persistence.FetchType;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.Index;
import jakarta.persistence.ManyToOne;
import jakarta.persistence.Table;
import lombok.*;
@Entity
@Getter
@ToString
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Table(name = "Reply", indexes = {
@Index(name = "idx_reply_board_bno", columnList = "board_bno")
})
public class Reply extends BaseEntity {
@Id // primary key
@GeneratedValue(strategy = GenerationType.IDENTITY) // auto_increment
private Long rno;
@ManyToOne(fetch = FetchType.LAZY)
private Board board;
private String replyText;
private String replyer;
public void changeText(String text) {
this.replyText = text;
}
}
- 이전글● 댓글 조회,수정,삭제,목록 처리 24.06.21
- 다음글ReplyService 24.06.21
댓글목록
등록된 댓글이 없습니다.