From c77da463a60061877cd7ddea1bd7b723b3bf2455 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Wed, 31 Dec 2025 00:53:48 +0900 Subject: feat(repo): extend CardRepository with note data support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add noteId and isReversed fields to Card interface for note-based cards. Implement findByIdWithNoteData, findByNoteId, and softDeleteByNoteId methods to support fetching cards with their associated note data and cascading deletions. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- src/server/routes/sync.test.ts | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/server/routes/sync.test.ts') diff --git a/src/server/routes/sync.test.ts b/src/server/routes/sync.test.ts index e1b389f..7492b49 100644 --- a/src/server/routes/sync.test.ts +++ b/src/server/routes/sync.test.ts @@ -584,6 +584,8 @@ describe("GET /api/sync/pull", () => { const mockCard: Card = { id: "550e8400-e29b-41d4-a716-446655440001", deckId: "550e8400-e29b-41d4-a716-446655440000", + noteId: null, + isReversed: null, front: "Question", back: "Answer", state: 2, @@ -679,6 +681,8 @@ describe("GET /api/sync/pull", () => { const mockCard: Card = { id: "550e8400-e29b-41d4-a716-446655440001", deckId: "550e8400-e29b-41d4-a716-446655440000", + noteId: null, + isReversed: null, front: "Q", back: "A", state: 0, -- cgit v1.2.3-70-g09d2