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 { ServiceLineCountOrderByAggregateInputObjectSchema as ServiceLineCountOrderByAggregateInputObjectSchema } from './ServiceLineCountOrderByAggregateInput.schema';
import { ServiceLineAvgOrderByAggregateInputObjectSchema as ServiceLineAvgOrderByAggregateInputObjectSchema } from './ServiceLineAvgOrderByAggregateInput.schema';
import { ServiceLineMaxOrderByAggregateInputObjectSchema as ServiceLineMaxOrderByAggregateInputObjectSchema } from './ServiceLineMaxOrderByAggregateInput.schema';
import { ServiceLineMinOrderByAggregateInputObjectSchema as ServiceLineMinOrderByAggregateInputObjectSchema } from './ServiceLineMinOrderByAggregateInput.schema';
import { ServiceLineSumOrderByAggregateInputObjectSchema as ServiceLineSumOrderByAggregateInputObjectSchema } from './ServiceLineSumOrderByAggregateInput.schema'

const makeSchema = () => z.object({
  id: SortOrderSchema.optional(),
  claimId: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
  paymentId: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
  procedureCode: SortOrderSchema.optional(),
  procedureDate: SortOrderSchema.optional(),
  quad: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
  arch: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
  toothNumber: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
  toothSurface: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
  icn: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
  paidCode: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
  allowedAmount: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
  totalBilled: SortOrderSchema.optional(),
  totalPaid: SortOrderSchema.optional(),
  totalAdjusted: SortOrderSchema.optional(),
  totalDue: SortOrderSchema.optional(),
  status: SortOrderSchema.optional(),
  _count: z.lazy(() => ServiceLineCountOrderByAggregateInputObjectSchema).optional(),
  _avg: z.lazy(() => ServiceLineAvgOrderByAggregateInputObjectSchema).optional(),
  _max: z.lazy(() => ServiceLineMaxOrderByAggregateInputObjectSchema).optional(),
  _min: z.lazy(() => ServiceLineMinOrderByAggregateInputObjectSchema).optional(),
  _sum: z.lazy(() => ServiceLineSumOrderByAggregateInputObjectSchema).optional()
}).strict();
export const ServiceLineOrderByWithAggregationInputObjectSchema: z.ZodType<Prisma.ServiceLineOrderByWithAggregationInput> = makeSchema() as unknown as z.ZodType<Prisma.ServiceLineOrderByWithAggregationInput>;
export const ServiceLineOrderByWithAggregationInputObjectZodSchema = makeSchema();
