feat(ST-1112): add shared zod schema for task dialog
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
74c0dea252
commit
650e740f9f
1 changed files with 12 additions and 0 deletions
12
lib/schemas/task.ts
Normal file
12
lib/schemas/task.ts
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
import { z } from 'zod'
|
||||
import { TaskStatus } from '@prisma/client'
|
||||
|
||||
export const taskSchema = z.object({
|
||||
title: z.string().trim().min(1, 'Verplicht').max(120),
|
||||
description: z.string().max(2000).optional(),
|
||||
implementation_plan: z.string().max(10000).optional(),
|
||||
priority: z.number().int().min(1).max(4),
|
||||
status: z.nativeEnum(TaskStatus).optional(),
|
||||
})
|
||||
|
||||
export type TaskInput = z.infer<typeof taskSchema>
|
||||
Loading…
Add table
Add a link
Reference in a new issue