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 { CommunicationCountOrderByAggregateInputObjectSchema as CommunicationCountOrderByAggregateInputObjectSchema } from './CommunicationCountOrderByAggregateInput.schema';
import { CommunicationAvgOrderByAggregateInputObjectSchema as CommunicationAvgOrderByAggregateInputObjectSchema } from './CommunicationAvgOrderByAggregateInput.schema';
import { CommunicationMaxOrderByAggregateInputObjectSchema as CommunicationMaxOrderByAggregateInputObjectSchema } from './CommunicationMaxOrderByAggregateInput.schema';
import { CommunicationMinOrderByAggregateInputObjectSchema as CommunicationMinOrderByAggregateInputObjectSchema } from './CommunicationMinOrderByAggregateInput.schema';
import { CommunicationSumOrderByAggregateInputObjectSchema as CommunicationSumOrderByAggregateInputObjectSchema } from './CommunicationSumOrderByAggregateInput.schema'

const makeSchema = () => z.object({
  id: SortOrderSchema.optional(),
  patientId: SortOrderSchema.optional(),
  userId: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
  channel: SortOrderSchema.optional(),
  direction: SortOrderSchema.optional(),
  status: SortOrderSchema.optional(),
  body: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
  callDuration: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
  twilioSid: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
  createdAt: SortOrderSchema.optional(),
  _count: z.lazy(() => CommunicationCountOrderByAggregateInputObjectSchema).optional(),
  _avg: z.lazy(() => CommunicationAvgOrderByAggregateInputObjectSchema).optional(),
  _max: z.lazy(() => CommunicationMaxOrderByAggregateInputObjectSchema).optional(),
  _min: z.lazy(() => CommunicationMinOrderByAggregateInputObjectSchema).optional(),
  _sum: z.lazy(() => CommunicationSumOrderByAggregateInputObjectSchema).optional()
}).strict();
export const CommunicationOrderByWithAggregationInputObjectSchema: z.ZodType<Prisma.CommunicationOrderByWithAggregationInput> = makeSchema() as unknown as z.ZodType<Prisma.CommunicationOrderByWithAggregationInput>;
export const CommunicationOrderByWithAggregationInputObjectZodSchema = makeSchema();
