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 { ClaimOrderByWithRelationInputObjectSchema as ClaimOrderByWithRelationInputObjectSchema } from './ClaimOrderByWithRelationInput.schema';
import { PatientOrderByWithRelationInputObjectSchema as PatientOrderByWithRelationInputObjectSchema } from './PatientOrderByWithRelationInput.schema';
import { UserOrderByWithRelationInputObjectSchema as UserOrderByWithRelationInputObjectSchema } from './UserOrderByWithRelationInput.schema';
import { NpiProviderOrderByWithRelationInputObjectSchema as NpiProviderOrderByWithRelationInputObjectSchema } from './NpiProviderOrderByWithRelationInput.schema';
import { ServiceLineTransactionOrderByRelationAggregateInputObjectSchema as ServiceLineTransactionOrderByRelationAggregateInputObjectSchema } from './ServiceLineTransactionOrderByRelationAggregateInput.schema';
import { ServiceLineOrderByRelationAggregateInputObjectSchema as ServiceLineOrderByRelationAggregateInputObjectSchema } from './ServiceLineOrderByRelationAggregateInput.schema';
import { CommissionBatchItemOrderByRelationAggregateInputObjectSchema as CommissionBatchItemOrderByRelationAggregateInputObjectSchema } from './CommissionBatchItemOrderByRelationAggregateInput.schema'

const makeSchema = () => z.object({
  id: SortOrderSchema.optional(),
  claimId: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
  patientId: SortOrderSchema.optional(),
  userId: SortOrderSchema.optional(),
  updatedById: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
  npiProviderId: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
  totalBilled: SortOrderSchema.optional(),
  totalPaid: SortOrderSchema.optional(),
  totalAdjusted: SortOrderSchema.optional(),
  totalDue: SortOrderSchema.optional(),
  mhPaidAmount: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
  copayment: SortOrderSchema.optional(),
  adjustment: SortOrderSchema.optional(),
  status: SortOrderSchema.optional(),
  notes: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
  icn: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
  createdAt: SortOrderSchema.optional(),
  updatedAt: SortOrderSchema.optional(),
  claim: z.lazy(() => ClaimOrderByWithRelationInputObjectSchema).optional(),
  patient: z.lazy(() => PatientOrderByWithRelationInputObjectSchema).optional(),
  updatedBy: z.lazy(() => UserOrderByWithRelationInputObjectSchema).optional(),
  npiProvider: z.lazy(() => NpiProviderOrderByWithRelationInputObjectSchema).optional(),
  serviceLineTransactions: z.lazy(() => ServiceLineTransactionOrderByRelationAggregateInputObjectSchema).optional(),
  serviceLines: z.lazy(() => ServiceLineOrderByRelationAggregateInputObjectSchema).optional(),
  commissionBatchItems: z.lazy(() => CommissionBatchItemOrderByRelationAggregateInputObjectSchema).optional()
}).strict();
export const PaymentOrderByWithRelationInputObjectSchema: z.ZodType<Prisma.PaymentOrderByWithRelationInput> = makeSchema() as unknown as z.ZodType<Prisma.PaymentOrderByWithRelationInput>;
export const PaymentOrderByWithRelationInputObjectZodSchema = makeSchema();
