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