import * as z from 'zod';
import type { Prisma } from '../../../generated/prisma';
import { SortOrderSchema } from '../enums/SortOrder.schema';
import { SortOrderInputObjectSchema as SortOrderInputObjectSchema } from './SortOrderInput.schema';
import { AppointmentOrderByWithRelationInputObjectSchema as AppointmentOrderByWithRelationInputObjectSchema } from './AppointmentOrderByWithRelationInput.schema';
import { PatientOrderByWithRelationInputObjectSchema as PatientOrderByWithRelationInputObjectSchema } from './PatientOrderByWithRelationInput.schema';
import { NpiProviderOrderByWithRelationInputObjectSchema as NpiProviderOrderByWithRelationInputObjectSchema } from './NpiProviderOrderByWithRelationInput.schema'

const makeSchema = () => z.object({
  id: SortOrderSchema.optional(),
  appointmentId: SortOrderSchema.optional(),
  patientId: SortOrderSchema.optional(),
  npiProviderId: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
  procedureCode: SortOrderSchema.optional(),
  procedureLabel: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
  fee: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
  category: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
  toothNumber: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
  toothSurface: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
  oralCavityArea: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
  source: SortOrderSchema.optional(),
  comboKey: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
  createdAt: SortOrderSchema.optional(),
  appointment: z.lazy(() => AppointmentOrderByWithRelationInputObjectSchema).optional(),
  patient: z.lazy(() => PatientOrderByWithRelationInputObjectSchema).optional(),
  npiProvider: z.lazy(() => NpiProviderOrderByWithRelationInputObjectSchema).optional()
}).strict();
export const AppointmentProcedureOrderByWithRelationInputObjectSchema: z.ZodType<Prisma.AppointmentProcedureOrderByWithRelationInput> = makeSchema() as unknown as z.ZodType<Prisma.AppointmentProcedureOrderByWithRelationInput>;
export const AppointmentProcedureOrderByWithRelationInputObjectZodSchema = makeSchema();
