trpc-shield
Version:
tRPC permissions as another layer of abstraction!
19 lines (15 loc) • 516 B
text/typescript
import { z } from 'zod';
import type { Prisma } from '@prisma/client';
const Schema: z.ZodType<any> = z
.object({
equals: z.number().optional(),
in: z.number().array().optional(),
notIn: z.number().array().optional(),
lt: z.number().optional(),
lte: z.number().optional(),
gt: z.number().optional(),
gte: z.number().optional(),
not: z.union([z.number(), z.lazy(() => NestedIntFilterObjectSchema)]).optional(),
})
.strict();
export const NestedIntFilterObjectSchema = Schema;