feat(04-01): add categoryId to threads schema, Zod schemas, and test helper
- Add categoryId column with FK to categories on threads table - Update createThreadSchema to require categoryId - Update updateThreadSchema to allow optional categoryId - Update test helper CREATE TABLE to include category_id Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -27,10 +27,12 @@ export const updateCategorySchema = z.object({
|
||||
// Thread schemas
|
||||
export const createThreadSchema = z.object({
|
||||
name: z.string().min(1, "Thread name is required"),
|
||||
categoryId: z.number().int().positive(),
|
||||
});
|
||||
|
||||
export const updateThreadSchema = z.object({
|
||||
name: z.string().min(1).optional(),
|
||||
categoryId: z.number().int().positive().optional(),
|
||||
});
|
||||
|
||||
// Candidate schemas (same fields as items)
|
||||
|
||||
Reference in New Issue
Block a user