aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/server/schemas
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-02-25 23:02:35 +0900
committernsfisis <nsfisis@gmail.com>2026-02-25 23:02:35 +0900
commit38b8fc0e9927c4146b4c8b309b2bcc644abd63d0 (patch)
treef76ba23251645e552fccd201362064b06de50bdd /src/server/schemas
parent7a77e72bb49ed3990a0c4581292a37a8a4f35231 (diff)
downloadkioku-main.tar.gz
kioku-main.tar.zst
kioku-main.zip
feat(decks): add default note type setting per deckHEADmain
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 <noreply@anthropic.com>
Diffstat (limited to 'src/server/schemas')
-rw-r--r--src/server/schemas/index.ts3
1 files changed, 3 insertions, 0 deletions
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