12 lines
414 B
TypeScript
12 lines
414 B
TypeScript
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>
|