import type { Prisma } from '../../generated/prisma';
import * as z from 'zod';
import { LabRxTemplateWhereInputObjectSchema as LabRxTemplateWhereInputObjectSchema } from './objects/LabRxTemplateWhereInput.schema';
import { LabRxTemplateOrderByWithAggregationInputObjectSchema as LabRxTemplateOrderByWithAggregationInputObjectSchema } from './objects/LabRxTemplateOrderByWithAggregationInput.schema';
import { LabRxTemplateScalarWhereWithAggregatesInputObjectSchema as LabRxTemplateScalarWhereWithAggregatesInputObjectSchema } from './objects/LabRxTemplateScalarWhereWithAggregatesInput.schema';
import { LabRxTemplateScalarFieldEnumSchema } from './enums/LabRxTemplateScalarFieldEnum.schema';
import { LabRxTemplateCountAggregateInputObjectSchema as LabRxTemplateCountAggregateInputObjectSchema } from './objects/LabRxTemplateCountAggregateInput.schema';
import { LabRxTemplateMinAggregateInputObjectSchema as LabRxTemplateMinAggregateInputObjectSchema } from './objects/LabRxTemplateMinAggregateInput.schema';
import { LabRxTemplateMaxAggregateInputObjectSchema as LabRxTemplateMaxAggregateInputObjectSchema } from './objects/LabRxTemplateMaxAggregateInput.schema';
import { LabRxTemplateAvgAggregateInputObjectSchema as LabRxTemplateAvgAggregateInputObjectSchema } from './objects/LabRxTemplateAvgAggregateInput.schema';
import { LabRxTemplateSumAggregateInputObjectSchema as LabRxTemplateSumAggregateInputObjectSchema } from './objects/LabRxTemplateSumAggregateInput.schema';

export const LabRxTemplateGroupBySchema: z.ZodType<Prisma.LabRxTemplateGroupByArgs> = z.object({ where: LabRxTemplateWhereInputObjectSchema.optional(), orderBy: z.union([LabRxTemplateOrderByWithAggregationInputObjectSchema, LabRxTemplateOrderByWithAggregationInputObjectSchema.array()]).optional(), having: LabRxTemplateScalarWhereWithAggregatesInputObjectSchema.optional(), take: z.number().optional(), skip: z.number().optional(), by: z.array(LabRxTemplateScalarFieldEnumSchema), _count: z.union([ z.literal(true), LabRxTemplateCountAggregateInputObjectSchema ]).optional(), _min: LabRxTemplateMinAggregateInputObjectSchema.optional(), _max: LabRxTemplateMaxAggregateInputObjectSchema.optional(), _avg: LabRxTemplateAvgAggregateInputObjectSchema.optional(), _sum: LabRxTemplateSumAggregateInputObjectSchema.optional() }).strict() as unknown as z.ZodType<Prisma.LabRxTemplateGroupByArgs>;

export const LabRxTemplateGroupByZodSchema = z.object({ where: LabRxTemplateWhereInputObjectSchema.optional(), orderBy: z.union([LabRxTemplateOrderByWithAggregationInputObjectSchema, LabRxTemplateOrderByWithAggregationInputObjectSchema.array()]).optional(), having: LabRxTemplateScalarWhereWithAggregatesInputObjectSchema.optional(), take: z.number().optional(), skip: z.number().optional(), by: z.array(LabRxTemplateScalarFieldEnumSchema), _count: z.union([ z.literal(true), LabRxTemplateCountAggregateInputObjectSchema ]).optional(), _min: LabRxTemplateMinAggregateInputObjectSchema.optional(), _max: LabRxTemplateMaxAggregateInputObjectSchema.optional(), _avg: LabRxTemplateAvgAggregateInputObjectSchema.optional(), _sum: LabRxTemplateSumAggregateInputObjectSchema.optional() }).strict();