import { z } from "zod"; export const Todo = z.object({ id: z.string(), title: z.string().min(1).max(280), done: z.boolean().default(false), due: z.string().datetime().nullable().default(null), createdAt: z.string().datetime(), }); export type Todo = z.infer; export const CreateTodo = z.object({ title: z.string().min(1).max(280), due: z.string().datetime().nullable().optional(), }); export type CreateTodo = z.infer; export const UpdateTodo = z.object({ title: z.string().min(1).max(280).optional(), done: z.boolean().optional(), due: z.string().datetime().nullable().optional(), }); export type UpdateTodo = z.infer;