From c1d24e24449808e4235fa586fbeb5760a36bc6bb Mon Sep 17 00:00:00 2001 From: nsfisis Date: Wed, 31 Dec 2025 01:29:39 +0900 Subject: feat(client): add note-related tables to client IndexedDB MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add LocalNoteType, LocalNoteFieldType, LocalNote, and LocalNoteFieldValue interfaces and tables to the client database for Anki-compatible note system. Update LocalCard interface with noteId and isReversed fields. Includes Dexie schema version 2 with upgrade handler for existing cards. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- src/client/db/repositories.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/client/db/repositories.ts') diff --git a/src/client/db/repositories.ts b/src/client/db/repositories.ts index 1a03f93..a2f0b41 100644 --- a/src/client/db/repositories.ts +++ b/src/client/db/repositories.ts @@ -171,6 +171,8 @@ export const localCardRepository = { data: Omit< LocalCard, | "id" + | "noteId" + | "isReversed" | "state" | "due" | "stability" @@ -185,11 +187,14 @@ export const localCardRepository = { | "deletedAt" | "syncVersion" | "_synced" - >, + > & + Partial>, ): Promise { const now = new Date(); const card: LocalCard = { id: uuidv4(), + noteId: null, + isReversed: null, ...data, state: CardState.New, due: now, -- cgit v1.2.3-70-g09d2