Files
inkling/tests/unit/NotebookRepository.test.ts
th-kim0823 caa4728e21 feat(notebook): NotebookRepository CRUD + noteCount + RESTRICT delete
- Notebook 인터페이스 src/shared/types.ts 에 추가 (noteCount = active 노트 수)
- NotebookRepository.ts 신설: list / findById / create / rename / setColor / delete / moveNote
- delete: FK RESTRICT 위반 → ok:false reason='has_notes', 미존재 → 'not_found'
- noteCount 서브쿼리: status='active' 만 카운트 (completed/trashed 제외)
- 테스트 10개 모두 통과, typecheck clean

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-15 09:58:24 +09:00

3.5 KiB