From 38b8fc0e9927c4146b4c8b309b2bcc644abd63d0 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Wed, 25 Feb 2026 23:02:35 +0900 Subject: feat(decks): add default note type setting per deck Allow each deck to specify a default note type that is auto-selected when creating new notes. Includes DB schema migration, server API updates, sync layer support, and UI for editing the default in the deck settings modal. Co-Authored-By: Claude Opus 4.6 --- src/server/schemas/index.ts | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/server/schemas') diff --git a/src/server/schemas/index.ts b/src/server/schemas/index.ts index aa9ceea..42328f2 100644 --- a/src/server/schemas/index.ts +++ b/src/server/schemas/index.ts @@ -48,6 +48,7 @@ export const deckSchema = z.object({ userId: z.uuid(), name: z.string().min(1).max(255), description: z.string().max(1000).nullable(), + defaultNoteTypeId: z.uuid().nullable(), createdAt: z.coerce.date(), updatedAt: z.coerce.date(), deletedAt: z.coerce.date().nullable(), @@ -58,12 +59,14 @@ export const deckSchema = z.object({ export const createDeckSchema = z.object({ name: z.string().min(1).max(255), description: z.string().max(1000).nullable().optional(), + defaultNoteTypeId: z.uuid().nullable().optional(), }); // Deck update input schema export const updateDeckSchema = z.object({ name: z.string().min(1).max(255).optional(), description: z.string().max(1000).nullable().optional(), + defaultNoteTypeId: z.uuid().nullable().optional(), }); // Card schema -- cgit v1.3-1-g0d28