eletrotupi / tcc / api/src/schemas/trigger.schema.ts master
294 B Raw
import { z } from 'zod';
import {
  TriggerType
} from '@prisma/client';

export const CreateTriggerSchema = z.object({
  comment: z.string().optional(),
  moment: z.coerce.date(),
  category: z.nativeEnum(TriggerType)
});

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