feat(store): 구매자 매장 상세 조회(storeDetail)와 StoreImage 스키마 추가#157
Conversation
- storeDetail 쿼리 신설: 매장 헤더(이미지·평점·리뷰수·찜)·전화·주소·좌표·영업/휴무/안내문 노출. OptionalJwtAuthGuard로 비로그인 조회 + 로그인 시 isWishlisted - StoreImage 테이블 + Store.access_guide_text·regular_closure_text 컬럼 추가 (구매자 조회용, seller 입력 API는 차기) - 시드/스토어 팩토리 보강, 단위(mapper)·통합(service/resolver) 테스트 18건
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🩺 NestJS Doctor — 89/100 (Good)진단 256건 (error 0).
architecture / security 상위 항목
|
🧹 knip — dead-code 리포트전체 리포트
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 78992f8859
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| store_images: { | ||
| create: [ |
There was a problem hiding this comment.
Delete seeded store images before deleting stores
When yarn prisma:seed is run a second time, these newly-created store_image rows remain during resetSeedScope: that cleanup deletes storeBusinessHour and storeSpecialClosure and then calls prisma.store.deleteMany for the seed stores, but it never deletes storeImage rows. Because the new FK is ON DELETE RESTRICT, the second seed run will fail with a foreign-key violation instead of staying idempotent; add prisma.storeImage.deleteMany({ where: { store_id: { in: storeIds } } }) before deleting stores or make the relation cascade intentionally.
Useful? React with 👍 / 👎.
Coverage report
Test suite run success1362 tests passing in 162 suites. Report generated by 🧪jest coverage report action from 04d5fc6 |
store_image FK가 ON DELETE RESTRICT라 store 삭제 전 store_image를 정리하지 않으면 2회차 yarn prisma:seed가 FK 위반으로 실패한다. resetSeedScope에 storeImage.deleteMany를 추가해 멱등성을 보장한다. (Codex P2 반영)
Summary
구매자(유저)용 매장 상세 조회 API
storeDetail를 신설한다. 인기 매장 리스트에서 매장 클릭 후 진입하는 상세 화면의 헤더 영역(매장 정보·평점·찜·전화·지도·영업/휴무/안내)을 담당한다. 구매자 측 매장/상품 조회 API 공백을 채우는 store-detail 도메인 작업의 1단계(스키마 + 매장 헤더).Scope
storeDetail(storeId: ID!): StoreDetail!OptionalJwtAuthGuard: 비로그인 조회 가능, 로그인 시에만isWishlisted채움NOT_FOUNDStoreImage테이블 신설(ProductImage동형, 매장당 다중 이미지)Store.access_guide_text(찾아오는 길) ·Store.regular_closure_text(정기 휴무 표기) 컬럼 추가aggregateReviewStats, 찜 여부는 기존findWishlistedStoreIds재사용.buildRegionLabel은 단건 조회에도 쓰도록 파라미터 타입만 구조화stores.ts) · 스토어 팩토리 보강진행 상황
Impact
Test plan
yarn validate전체 통과: 162 suites / 1362 tests, lint·tsc·dto:check·arch:check 통과, 커버리지 임계 충족