Id - @Id, @GeneratedValue 어노테이션 사용
제목 (String title)
작성자명 (String username)
작성 내용 (String contents)
날짜 - Timestamped 클래스를 만들어서 대입
비밀번호 (String pw)
신경써야될 점
(1). '선택한~'이 붙은 기능들은 id값을 ajax에 넘겨줘서 조회해야될 것 같음
(2). 비밀번호를 비교하는 로직이 필요함
개발순서
// 예상 코드
public Posts(PostsRequestDto requestDto) {
this.username = requestDto.getUsername();
this.title = requestDto.getTitle();
this.contents = requestDto.getContents();
this.password = requestDto.getPassword();
}
Dto가 아직 잘 이해가 안 됨 추가 공부를 좀 더 해봐야겠음