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 { PatientOrderByWithRelationInputObjectSchema as PatientOrderByWithRelationInputObjectSchema } from './PatientOrderByWithRelationInput.schema';
import { AppointmentOrderByWithRelationInputObjectSchema as AppointmentOrderByWithRelationInputObjectSchema } from './AppointmentOrderByWithRelationInput.schema';
import { UserOrderByWithRelationInputObjectSchema as UserOrderByWithRelationInputObjectSchema } from './UserOrderByWithRelationInput.schema';
import { StaffOrderByWithRelationInputObjectSchema as StaffOrderByWithRelationInputObjectSchema } from './StaffOrderByWithRelationInput.schema';
import { NpiProviderOrderByWithRelationInputObjectSchema as NpiProviderOrderByWithRelationInputObjectSchema } from './NpiProviderOrderByWithRelationInput.schema';
import { ServiceLineOrderByRelationAggregateInputObjectSchema as ServiceLineOrderByRelationAggregateInputObjectSchema } from './ServiceLineOrderByRelationAggregateInput.schema';
import { ClaimFileOrderByRelationAggregateInputObjectSchema as ClaimFileOrderByRelationAggregateInputObjectSchema } from './ClaimFileOrderByRelationAggregateInput.schema';
import { PaymentOrderByWithRelationInputObjectSchema as PaymentOrderByWithRelationInputObjectSchema } from './PaymentOrderByWithRelationInput.schema'

const makeSchema = () => z.object({
  id: SortOrderSchema.optional(),
  patientId: SortOrderSchema.optional(),
  appointmentId: z.union([z.number().int().int(), z.lazy(() => SortOrderInputObjectSchema)]).optional(),
  userId: SortOrderSchema.optional(),
  staffId: SortOrderSchema.optional(),
  patientName: SortOrderSchema.optional(),
  memberId: SortOrderSchema.optional(),
  dateOfBirth: SortOrderSchema.optional(),
  remarks: SortOrderSchema.optional(),
  missingTeethStatus: SortOrderSchema.optional(),
  missingTeeth: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
  serviceDate: SortOrderSchema.optional(),
  insuranceProvider: SortOrderSchema.optional(),
  createdAt: SortOrderSchema.optional(),
  updatedAt: SortOrderSchema.optional(),
  status: SortOrderSchema.optional(),
  claimNumber: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
  preAuthNumber: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
  npiProviderId: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
  patient: z.lazy(() => PatientOrderByWithRelationInputObjectSchema).optional(),
  appointment: z.lazy(() => AppointmentOrderByWithRelationInputObjectSchema).optional(),
  user: z.lazy(() => UserOrderByWithRelationInputObjectSchema).optional(),
  staff: z.lazy(() => StaffOrderByWithRelationInputObjectSchema).optional(),
  npiProvider: z.lazy(() => NpiProviderOrderByWithRelationInputObjectSchema).optional(),
  serviceLines: z.lazy(() => ServiceLineOrderByRelationAggregateInputObjectSchema).optional(),
  claimFiles: z.lazy(() => ClaimFileOrderByRelationAggregateInputObjectSchema).optional(),
  payment: z.lazy(() => PaymentOrderByWithRelationInputObjectSchema).optional()
}).strict();
export const ClaimOrderByWithRelationInputObjectSchema: z.ZodType<Prisma.ClaimOrderByWithRelationInput> = makeSchema() as unknown as z.ZodType<Prisma.ClaimOrderByWithRelationInput>;
export const ClaimOrderByWithRelationInputObjectZodSchema = makeSchema();
