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