eletrotupi / tcc/ api/src/schemas/trigger.schema.tseee8eb98cd9e9cf9ee9ace1609a786e0e39e7480
294 B | 12 lines Raw
1
import { z } from 'zod';
2
import {
3
  TriggerType
4
} from '@prisma/client';
5

6
export const CreateTriggerSchema = z.object({
7
  comment: z.string().optional(),
8
  moment: z.coerce.date(),
9
  category: z.nativeEnum(TriggerType)
10
});
11

12
export type CreateTriggerInput = z.infer<typeof CreateTriggerSchema>;