Open
Conversation
jjunhub
reviewed
Oct 1, 2024
| private String author; | ||
| private String publisher; | ||
| private String isbn; | ||
| private char available; |
Member
There was a problem hiding this comment.
Suggested change
| private char available; | |
| private bool available; |
우선 char을 다음과 'Y'와 'N'을 표현하기 위해서 디테일한 필드 작성 너무 좋습니다!
이에 대해서 한 가지 코멘트 드릴 것이 있다면..
만약 avaiable의 상태가 Y, N을 제외한 추가적인 상황이 있다면 이는 ENUM의 형태로 처리하는 것이 유지보수면에서 좋을 것 같습니다. 그리고 2가지만으로 분류가 된다면 boolean(MySQL에서는 tinyint)로 처리하는 쪽이 어떨까 생각이 들었습니다.
jjunhub
reviewed
Oct 1, 2024
Comment on lines
+23
to
+24
| private String email; |
jjunhub
reviewed
Oct 1, 2024
| private String email; | ||
| private String phone; | ||
| private LocalDate joinDate; | ||
| private Long borrow; |
Member
There was a problem hiding this comment.
해당 필드는 borrow Table에 대해서 연관 관계를 나타내기 위해서 추가해주신 부분일까요?
Member
Author
There was a problem hiding this comment.
borrow는 빌린 책이 몇 권인지 나타내는 필드입니다..!
jjunhub
reviewed
Oct 1, 2024
|
|
||
| Book book1 = bookRepository.findByTitleAndAuthor("모순","양귀자"); | ||
|
|
||
| System.out.println("Member Id = " + book1.getBookId()); |
Member
There was a problem hiding this comment.
Suggested change
| System.out.println("Member Id = " + book1.getBookId()); | |
| Assertions.assertThat(book1).isNotNull(); | |
| Assertions.assertThat(book1.getTitle()).isEqualTo("모순"); | |
| Assertions.assertThat(book1.getAuthor()).isEqualTo("양귀자"); | |
| Assertions.assertThat(book1.getIsbn()).isEqualTo("9788998441012"); | |
| Assertions.assertThat(book1.getPublisher()).isEqualTo("쓰다"); |
종종 직접 값에 대해 print하는 것도 눈으로 확인하고 더욱 확신이 가고 좋습니다.
다만 위처럼 Assertions를 이용하여 값에 대한 검증을 프로그램에게 넘긴다면, 여러 개의 테스트 케이스를 확인하는데 훨씬 편리하다는 점 참고하시면 될 것 같습니다!! 고생하셨습니다.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
도서관 데이터베이스 테이블 - 책, 회원
책은 도서관에서 대출받을 수 있는 항목을 나타내며, 회원은 이에 해당하는 책을 대출할 수 있다