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

[refactor] (Point,PhoneNumber)primitive value -> VO Class #76

Merged
merged 16 commits into from
Jan 18, 2024

Conversation

0702Yoon
Copy link
Collaborator

해당 PR이 어떤 것을 하나요?

Point의 latitude와 longitude를 Double값으로 바로 받는 것이 아닌 Latitude ,Longitude의 value class로 받게 했다.
PhoneNumber 같은 경우는 Data class로 불변과 equals, hashjCode의 재정의가 이미 되어있어, 정규표현식에서 번호가 3인 것 까지 받게만 변경하였다.

고민(선택)

  1. @embeddable, @JsonDeserialize 등의 기존 코드의 이해
  2. data class와 value class의 이해
  3. @embeddable의 필드에는 JPA가 지원하는 타입만 올 수 있고 그것을 해결한 방법은 value class,@JvmInline

기획 문서 혹은 태스크 관련 링크

Copy link

codecov bot commented Dec 23, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (e421f54) 92.82% compared to head (9363b4c) 91.64%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main      #76      +/-   ##
============================================
- Coverage     92.82%   91.64%   -1.18%     
- Complexity      369      374       +5     
============================================
  Files            72       74       +2     
  Lines           850      862      +12     
  Branches         23       24       +1     
============================================
+ Hits            789      790       +1     
- Misses           47       58      +11     
  Partials         14       14              
Files Coverage Δ
...rc/main/kotlin/com/mjucow/eatda/common/vo/Point.kt 100.00% <100.00%> (ø)
...main/kotlin/com/mjucow/eatda/common/vo/Latitude.kt 66.66% <66.66%> (ø)
...ain/kotlin/com/mjucow/eatda/common/vo/Longitude.kt 66.66% <66.66%> (ø)

... and 2 files with indirect coverage changes

@pull-request-size pull-request-size bot added size/L and removed size/M labels Jan 6, 2024
@0702Yoon 0702Yoon requested a review from dojinyou January 9, 2024 12:42
@0702Yoon 0702Yoon requested a review from dojinyou January 12, 2024 03:24
Copy link
Member

@dojinyou dojinyou left a comment

Choose a reason for hiding this comment

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

네이밍 수정하고 범위만 줄이고 머지해주세요

src/main/kotlin/com/mjucow/eatda/common/vo/Latitude.kt Outdated Show resolved Hide resolved
src/test/kotlin/com/mjucow/eatda/common/vo/LatitudeTest.kt Outdated Show resolved Hide resolved
@0702Yoon 0702Yoon merged commit 1715c1b into main Jan 18, 2024
5 checks passed
@0702Yoon 0702Yoon deleted the pointPhoneNumberVOClass branch January 18, 2024 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor 코드 개선 size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants