-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathschemas.ts
More file actions
27 lines (22 loc) · 761 Bytes
/
Copy pathschemas.ts
File metadata and controls
27 lines (22 loc) · 761 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import { z } from 'zod';
import TodoItemStatusSchema from '@/lib/generated/prisma/zod/inputTypeSchemas/TodoItemStatusSchema';
export const createTodoSchema = z.object({
title: z.string().min(1, 'Title is required'),
description: z.string().min(1, 'Description is required'),
});
export const updateTodoSchema = z.object({
id: z.string().uuid(),
title: z.string().min(1, 'Title is required'),
description: z.string().min(1, 'Description is required'),
status: TodoItemStatusSchema,
});
export const deleteTodoSchema = z.object({
id: z.string().uuid(),
});
export const updateTodoStatusSchema = z.object({
id: z.string().uuid(),
status: TodoItemStatusSchema,
});
export const runTranslateJobSchema = z.object({
id: z.string().uuid(),
});