108 lines
3.6 KiB
TypeScript
108 lines
3.6 KiB
TypeScript
import { z } from 'zod';
|
|
import { IntFilterObjectSchema } from './IntFilter.schema';
|
|
import { StringFilterObjectSchema } from './StringFilter.schema';
|
|
import { DateTimeFilterObjectSchema } from './DateTimeFilter.schema';
|
|
import { StringNullableFilterObjectSchema } from './StringNullableFilter.schema';
|
|
import { UserRelationFilterObjectSchema } from './UserRelationFilter.schema';
|
|
import { UserWhereInputObjectSchema } from './UserWhereInput.schema';
|
|
import { AppointmentListRelationFilterObjectSchema } from './AppointmentListRelationFilter.schema';
|
|
|
|
import type { Prisma } from '../../../generated/prisma';
|
|
|
|
const Schema: z.ZodType<Prisma.PatientWhereInput> = z
|
|
.object({
|
|
AND: z
|
|
.union([
|
|
z.lazy(() => PatientWhereInputObjectSchema),
|
|
z.lazy(() => PatientWhereInputObjectSchema).array(),
|
|
])
|
|
.optional(),
|
|
OR: z
|
|
.lazy(() => PatientWhereInputObjectSchema)
|
|
.array()
|
|
.optional(),
|
|
NOT: z
|
|
.union([
|
|
z.lazy(() => PatientWhereInputObjectSchema),
|
|
z.lazy(() => PatientWhereInputObjectSchema).array(),
|
|
])
|
|
.optional(),
|
|
id: z.union([z.lazy(() => IntFilterObjectSchema), z.number()]).optional(),
|
|
firstName: z
|
|
.union([z.lazy(() => StringFilterObjectSchema), z.string()])
|
|
.optional(),
|
|
lastName: z
|
|
.union([z.lazy(() => StringFilterObjectSchema), z.string()])
|
|
.optional(),
|
|
dateOfBirth: z
|
|
.union([z.lazy(() => DateTimeFilterObjectSchema), z.coerce.date()])
|
|
.optional(),
|
|
gender: z
|
|
.union([z.lazy(() => StringFilterObjectSchema), z.string()])
|
|
.optional(),
|
|
phone: z
|
|
.union([z.lazy(() => StringFilterObjectSchema), z.string()])
|
|
.optional(),
|
|
email: z
|
|
.union([z.lazy(() => StringNullableFilterObjectSchema), z.string()])
|
|
.optional()
|
|
.nullable(),
|
|
address: z
|
|
.union([z.lazy(() => StringNullableFilterObjectSchema), z.string()])
|
|
.optional()
|
|
.nullable(),
|
|
city: z
|
|
.union([z.lazy(() => StringNullableFilterObjectSchema), z.string()])
|
|
.optional()
|
|
.nullable(),
|
|
zipCode: z
|
|
.union([z.lazy(() => StringNullableFilterObjectSchema), z.string()])
|
|
.optional()
|
|
.nullable(),
|
|
insuranceProvider: z
|
|
.union([z.lazy(() => StringNullableFilterObjectSchema), z.string()])
|
|
.optional()
|
|
.nullable(),
|
|
insuranceId: z
|
|
.union([z.lazy(() => StringNullableFilterObjectSchema), z.string()])
|
|
.optional()
|
|
.nullable(),
|
|
groupNumber: z
|
|
.union([z.lazy(() => StringNullableFilterObjectSchema), z.string()])
|
|
.optional()
|
|
.nullable(),
|
|
policyHolder: z
|
|
.union([z.lazy(() => StringNullableFilterObjectSchema), z.string()])
|
|
.optional()
|
|
.nullable(),
|
|
allergies: z
|
|
.union([z.lazy(() => StringNullableFilterObjectSchema), z.string()])
|
|
.optional()
|
|
.nullable(),
|
|
medicalConditions: z
|
|
.union([z.lazy(() => StringNullableFilterObjectSchema), z.string()])
|
|
.optional()
|
|
.nullable(),
|
|
status: z
|
|
.union([z.lazy(() => StringFilterObjectSchema), z.string()])
|
|
.optional(),
|
|
userId: z
|
|
.union([z.lazy(() => IntFilterObjectSchema), z.number()])
|
|
.optional(),
|
|
createdAt: z
|
|
.union([z.lazy(() => DateTimeFilterObjectSchema), z.coerce.date()])
|
|
.optional(),
|
|
user: z
|
|
.union([
|
|
z.lazy(() => UserRelationFilterObjectSchema),
|
|
z.lazy(() => UserWhereInputObjectSchema),
|
|
])
|
|
.optional(),
|
|
appointments: z
|
|
.lazy(() => AppointmentListRelationFilterObjectSchema)
|
|
.optional(),
|
|
})
|
|
.strict();
|
|
|
|
export const PatientWhereInputObjectSchema = Schema;
|