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 { AppointmentCountOrderByAggregateInputObjectSchema as AppointmentCountOrderByAggregateInputObjectSchema } from './AppointmentCountOrderByAggregateInput.schema';
import { AppointmentAvgOrderByAggregateInputObjectSchema as AppointmentAvgOrderByAggregateInputObjectSchema } from './AppointmentAvgOrderByAggregateInput.schema';
import { AppointmentMaxOrderByAggregateInputObjectSchema as AppointmentMaxOrderByAggregateInputObjectSchema } from './AppointmentMaxOrderByAggregateInput.schema';
import { AppointmentMinOrderByAggregateInputObjectSchema as AppointmentMinOrderByAggregateInputObjectSchema } from './AppointmentMinOrderByAggregateInput.schema';
import { AppointmentSumOrderByAggregateInputObjectSchema as AppointmentSumOrderByAggregateInputObjectSchema } from './AppointmentSumOrderByAggregateInput.schema'

const makeSchema = () => z.object({
  id: SortOrderSchema.optional(),
  patientId: SortOrderSchema.optional(),
  userId: SortOrderSchema.optional(),
  staffId: SortOrderSchema.optional(),
  title: SortOrderSchema.optional(),
  date: SortOrderSchema.optional(),
  startTime: SortOrderSchema.optional(),
  endTime: SortOrderSchema.optional(),
  type: SortOrderSchema.optional(),
  typeLocked: SortOrderSchema.optional(),
  notes: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
  procedureCodeNotes: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
  status: SortOrderSchema.optional(),
  movedByAi: SortOrderSchema.optional(),
  createdAt: SortOrderSchema.optional(),
  eligibilityStatus: SortOrderSchema.optional(),
  _count: z.lazy(() => AppointmentCountOrderByAggregateInputObjectSchema).optional(),
  _avg: z.lazy(() => AppointmentAvgOrderByAggregateInputObjectSchema).optional(),
  _max: z.lazy(() => AppointmentMaxOrderByAggregateInputObjectSchema).optional(),
  _min: z.lazy(() => AppointmentMinOrderByAggregateInputObjectSchema).optional(),
  _sum: z.lazy(() => AppointmentSumOrderByAggregateInputObjectSchema).optional()
}).strict();
export const AppointmentOrderByWithAggregationInputObjectSchema: z.ZodType<Prisma.AppointmentOrderByWithAggregationInput> = makeSchema() as unknown as z.ZodType<Prisma.AppointmentOrderByWithAggregationInput>;
export const AppointmentOrderByWithAggregationInputObjectZodSchema = makeSchema();
