-
Notifications
You must be signed in to change notification settings - Fork 0
feat: 장소 도메인 및 기능 설계 #24
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
Conversation
sosow0212
left a comment
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.
의존 관련해서 한 가지 확인만 부탁드릴게요~ 수고하셨습니다!
| @Column(name = "road_address_name") | ||
| val roadAddressName: String?, | ||
|
|
||
| @Column(name = "address_name") | ||
| val addressName: String?, |
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.
아아 도로명주소랑 지명주소군요!
| private val packageLocationRepository: PackageLocationRepository, | ||
| ) { | ||
|
|
||
| fun upsertPackageLocation(command: CreateLocationCommand): PackageLocation { |
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.
패키지가 추가될 때 장소가 추가될 것 같은데, 그러면 Package.of(..., + Location)으로 생성한 후 packageRepository.save()로 같이 저장하는 건 어떨까요?
의도적 분리라면, PackageService에서 ApplicationEventPublisher.publish(PackageCreatedEvent)를 통해서 끊어주는 것도 괜찮을 것 같습니다
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.
Location이 존재하지 않는 경우가 실제로 존재하는지 문의드려보고 없는 경우 package save 시에 함께 저장하는 방향으로,
있다면 ApplicationEventPublisher.publish(PackageCreatedEvent)로 수정해보겠습니다!
|
추가적으로 현재 Product에도 임시로 location을 String 타입으로 선언해둔 상태인데 이건 이제 필요 없을까요? 해당 부분도 확인 부탁드릴게요~ |
|
설계할 때 여쭤봤을 때 패키지의 장소가 product의 장소 중 하나가 되는 건 아니고, 패키지 자체가 하나의 장소를 가진다고 설명해주셔서 product의 location은 그대로 유지했습니다! |
|
장소 도메인 수정하여 커밋했습니다! |
* feat: 장소 도메인 설계 * feat: 장소 생성, 수정 기능 구현 * fix: Jpa 필드명 수정 * fix: 디렉터리명 수정 * feat: 테스트 코드 구현 * feat: pkg 디렉토리로 감싸도록 수정 및 API 구현 * refactor: 패키지 조회 무한 스크롤 방식으로 수정 * feat: 상품 이미지 추가 구현 * refactor: 스웨거 설명 변경 * feat: 패키지 이벤트 추가 * fix: replace -> update로 수정 * fix: location test 메서드명 수정 * refactor: payload 구조로 변경 --------- Co-authored-by: sosow0212 <[email protected]>
* feat: 회원 설문 도메인, API 구현 * 패키지, 상품 API 구현 (#27) * feat: pkg 디렉토리로 감싸도록 수정 및 API 구현 * refactor: 패키지 조회 무한 스크롤 방식으로 수정 * feat: 상품 이미지 추가 구현 * refactor: 스웨거 설명 변경 * refactor: 반환자 변경 * feat: 장소 도메인 및 기능 설계 (#24) * feat: 장소 도메인 설계 * feat: 장소 생성, 수정 기능 구현 * fix: Jpa 필드명 수정 * fix: 디렉터리명 수정 * feat: 테스트 코드 구현 * feat: pkg 디렉토리로 감싸도록 수정 및 API 구현 * refactor: 패키지 조회 무한 스크롤 방식으로 수정 * feat: 상품 이미지 추가 구현 * refactor: 스웨거 설명 변경 * feat: 패키지 이벤트 추가 * fix: replace -> update로 수정 * fix: location test 메서드명 수정 * refactor: payload 구조로 변경 --------- Co-authored-by: sosow0212 <[email protected]> * fix: 여러 장소를 저장하도록 수정 * feat: 테스트 코드 추가 * feat: QueryService로 조회 로직 이전 * fix: 디렉터리 구조 수정 * fix: 옵션, 메서드명 수정 --------- Co-authored-by: Jaeyoon Lee <[email protected]>
📄 작업 내용
장소 도메인과 생성, 수정 기능을 구현했습니다.
Package마다 하나의 장소만 존재하도록 unique 제약, 1:1 관계로 생성되도록 구현했고, Package와 생애주기가 동일하므로 같은 애그리거트로 추가했습니다.
위도, 경도, kakaoPlaceId, 주소(도로명 주소 및 지번 주소)
Location 생성, 수정 기능
🙋🏻 이슈 / 궁금증 / 추가사항
저번 디렉터리 구조 변경할 때 gradle의 프로젝트명 변경이 이루어지지 않은 파일이 있어서 같이 수정했는데, PR 범위가 섞여 죄송합니다..
close #8