eletrotupi / tcc/ api/src/schemas/trigger.schema.ts24f49f7fa94d199c1c1ba1f8424a195cd7e6ee9d
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>;