15 lines
668 B
TypeScript
15 lines
668 B
TypeScript
import * as z from 'zod';
|
|
import type { Prisma } from '../../../generated/prisma';
|
|
import { NotificationTypesSchema } from '../enums/NotificationTypes.schema'
|
|
|
|
const makeSchema = () => z.object({
|
|
id: z.number().int().optional(),
|
|
userId: z.number().int(),
|
|
type: NotificationTypesSchema,
|
|
message: z.string(),
|
|
createdAt: z.coerce.date().optional(),
|
|
read: z.boolean().optional()
|
|
}).strict();
|
|
export const NotificationUncheckedCreateInputObjectSchema: z.ZodType<Prisma.NotificationUncheckedCreateInput> = makeSchema() as unknown as z.ZodType<Prisma.NotificationUncheckedCreateInput>;
|
|
export const NotificationUncheckedCreateInputObjectZodSchema = makeSchema();
|