Skip to content
Source
Sign inSign up
TanStack/router
Open History to see the last commit

schema.ts

14 lines351 Bytes

1import { z } from 'zod'
2​
3// Zod is necessary for client side parsing.
4​
5export const itemSchema = z.object({
6 id: z.string(),
7 title: z.string(),
8 content: z.string().optional(),
9 order: z.coerce.number(),
10 columnId: z.string().uuid(),
11 boardId: z.coerce.string(),
12})
13​
14export const deleteItemSchema = itemSchema.pick({ id: true, boardId: true })