Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] popularRate 관련 오류 수정 #81

Merged
merged 3 commits into from
Mar 28, 2024
Merged

Conversation

eeddiinn
Copy link
Contributor

📌 관련 이슈

closed #80

✨ 어떤 이유로 변경된 내용인지

  • popularRate 필드가 없어서 생기는 오류를 수정하였습니다

🙏 검토 혹은 리뷰어에게 남기고 싶은 말

  • 🤨

@eeddiinn eeddiinn added 예진❄️ 🐞BugFix 에러 수정, 버그 수정 🔥 Pull Request PR 날림 labels Mar 27, 2024
@eeddiinn eeddiinn self-assigned this Mar 27, 2024
Copy link
Member

@ddongseop ddongseop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍👍👍

@@ -64,18 +64,22 @@ public void addFavorite(Favorite favorite) {
favorites.add(favorite);
}

@Column(nullable = false)
private int popularRate = 0;
Copy link
Member

@ddongseop ddongseop Mar 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] int 필드는 null일 수가 없습니다. 따라서 nullable=false를 작성할 필요가 없습니다!
그리고 기본값이 자동으로 0으로 설정됩니다.
하지만 가독성을 위해 0을 적는것도 괜찮은 선택지일 수 있을듯 합니다~

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아하 까머것다 캬캬
감사합니당 ~~~!!

@Builder
public Book(String uuid, String favoriteName, String favoriteImage, String title, String description, String backgroundColor, Member member) {
public Book(String uuid, String favoriteName, String favoriteImage, String title, String description, String backgroundColor, Member member, int popularRate) {
Copy link
Member

@ddongseop ddongseop Mar 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P3] 지금 현재 생성할 때 popularRate를 넣어주고 있지 않고,
이후에 스케줄링으로 popularRate를 설정해줄 때도 생성할 시점에 값을 넣어주지는 않기 때문에 생성자에 추가한 부분은 없어도 될 것 같습니다!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

네엡 !!!

Copy link
Contributor

@dong2ast dong2ast left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

잘했네 막둥이 🙂 👍

@eeddiinn eeddiinn merged commit d4d8335 into develop Mar 28, 2024
1 check passed
@eeddiinn eeddiinn deleted the fix/#80-field_error_fix branch March 28, 2024 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
예진❄️ 🐞BugFix 에러 수정, 버그 수정 🔥 Pull Request PR 날림
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FIX] popular_rate 관련 오류 수정
3 participants