feat(region): 지역 마스터(1·2차 시군구) 모델 + 조회/검색 API + 수도권 시드#144
Conversation
|
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 |
🧹 knip — dead-code 리포트전체 리포트
|
🩺 NestJS Doctor — 88/100 (Good)진단 248건 (error 0).
architecture / security 상위 항목
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Coverage report
Test suite run success1275 tests passing in 148 suites. Report generated by 🧪jest coverage report action from 735e155 |
Summary
인기 매장 리스트 · 픽업 필터(figma 명세) 백엔드 작업의 PR1 / 지역(Region) 기반입니다. 지역 선택 바텀시트(화면 02·03·04)를 받치는 지역 마스터 데이터 + 조회/검색 API를 신설했습니다.
기존
Store는address_city/district/neighborhoodfree-text만 보유해 지역 필터가 불가능했습니다. 1·2차 계층 지역 마스터를 신설하고, 매장을 표준 시군구에 매핑할 기반을 마련했습니다.Scope
Region모델 신설(self-FK 계층 — level 1 광역그룹 / level 2 시군구) +Store.region_idFK + 마이그레이션regionGroups/regions(parentId)/searchRegions(input)— 비로그인 public query진행 상황
전체 4개 PR 중 1번째:
Impact
region테이블 신설.store.region_idnullable 추가(기존 매장 무영향). FKON DELETE SET NULL.resetSeedScope비대상) + 기존 시드 매장 2곳 region 연결.Test plan
yarn validate전체 통과 — 148 suites / 1275 tests / 커버리지 임계(96·86·92·96) 충족hasChildren,sort_order, soft-delete·비활성 제외,parentId404/BadRequest, 검색의parentName·limit·빈 검색어 처리regionGroups→regions(parentId)→searchRegions(keyword)후속(이 PR 범위 밖)
nearbyRegions(현재 위치 주변): Region 좌표 데이터 확보 후