-
Notifications
You must be signed in to change notification settings - Fork 0
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
Refactor | CAKK-54 | 케이크 하트 기능 리팩토링 #193
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅ @@ Coverage Diff @@
## develop #193 +/- ##
=============================================
+ Coverage 88.88% 90.11% +1.22%
- Complexity 324 330 +6
=============================================
Files 110 110
Lines 990 991 +1
Branches 37 38 +1
=============================================
+ Hits 880 893 +13
+ Misses 89 81 -8
+ Partials 21 17 -4
... and 2 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Service Layer에서 도메인으로 책임 이동으로 인해 훨씬 깔끔하고 보기 좋은 것 같네요
private void decreaseHeartCount() { | ||
this.heartCount--; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
음수 방지를 위해 검증 로직 필요 없을까요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
db에서 막으려고 했는데, 서버에도 validation 체크를 추가해야겠네요
CAKK-54
케이크 하트 기능이 트랜잭션 스크립트 패턴으로 작성돼있다고 생각들어 객체지향적으로 리팩토링(도메인 모델 패턴) 해보았습니다. 리뷰 후에 케이크 샵 하트 및 기대돼요 기능까지 비슷하게 적용하겠습니다.