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 { LabRxTemplateCountOrderByAggregateInputObjectSchema as LabRxTemplateCountOrderByAggregateInputObjectSchema } from './LabRxTemplateCountOrderByAggregateInput.schema';
import { LabRxTemplateAvgOrderByAggregateInputObjectSchema as LabRxTemplateAvgOrderByAggregateInputObjectSchema } from './LabRxTemplateAvgOrderByAggregateInput.schema';
import { LabRxTemplateMaxOrderByAggregateInputObjectSchema as LabRxTemplateMaxOrderByAggregateInputObjectSchema } from './LabRxTemplateMaxOrderByAggregateInput.schema';
import { LabRxTemplateMinOrderByAggregateInputObjectSchema as LabRxTemplateMinOrderByAggregateInputObjectSchema } from './LabRxTemplateMinOrderByAggregateInput.schema';
import { LabRxTemplateSumOrderByAggregateInputObjectSchema as LabRxTemplateSumOrderByAggregateInputObjectSchema } from './LabRxTemplateSumOrderByAggregateInput.schema'

const makeSchema = () => z.object({
  id: SortOrderSchema.optional(),
  userId: SortOrderSchema.optional(),
  name: SortOrderSchema.optional(),
  labName: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
  labPhone: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
  labFax: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
  labAddress: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
  labAccount: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
  caseType: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
  material: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
  instructions: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
  sortOrder: SortOrderSchema.optional(),
  createdAt: SortOrderSchema.optional(),
  updatedAt: SortOrderSchema.optional(),
  _count: z.lazy(() => LabRxTemplateCountOrderByAggregateInputObjectSchema).optional(),
  _avg: z.lazy(() => LabRxTemplateAvgOrderByAggregateInputObjectSchema).optional(),
  _max: z.lazy(() => LabRxTemplateMaxOrderByAggregateInputObjectSchema).optional(),
  _min: z.lazy(() => LabRxTemplateMinOrderByAggregateInputObjectSchema).optional(),
  _sum: z.lazy(() => LabRxTemplateSumOrderByAggregateInputObjectSchema).optional()
}).strict();
export const LabRxTemplateOrderByWithAggregationInputObjectSchema: z.ZodType<Prisma.LabRxTemplateOrderByWithAggregationInput> = makeSchema() as unknown as z.ZodType<Prisma.LabRxTemplateOrderByWithAggregationInput>;
export const LabRxTemplateOrderByWithAggregationInputObjectZodSchema = makeSchema();
