import type { Prisma } from '../../generated/prisma';
import * as z from 'zod';
import { CommissionBatchItemWhereInputObjectSchema as CommissionBatchItemWhereInputObjectSchema } from './objects/CommissionBatchItemWhereInput.schema';
import { CommissionBatchItemOrderByWithAggregationInputObjectSchema as CommissionBatchItemOrderByWithAggregationInputObjectSchema } from './objects/CommissionBatchItemOrderByWithAggregationInput.schema';
import { CommissionBatchItemScalarWhereWithAggregatesInputObjectSchema as CommissionBatchItemScalarWhereWithAggregatesInputObjectSchema } from './objects/CommissionBatchItemScalarWhereWithAggregatesInput.schema';
import { CommissionBatchItemScalarFieldEnumSchema } from './enums/CommissionBatchItemScalarFieldEnum.schema';
import { CommissionBatchItemCountAggregateInputObjectSchema as CommissionBatchItemCountAggregateInputObjectSchema } from './objects/CommissionBatchItemCountAggregateInput.schema';
import { CommissionBatchItemMinAggregateInputObjectSchema as CommissionBatchItemMinAggregateInputObjectSchema } from './objects/CommissionBatchItemMinAggregateInput.schema';
import { CommissionBatchItemMaxAggregateInputObjectSchema as CommissionBatchItemMaxAggregateInputObjectSchema } from './objects/CommissionBatchItemMaxAggregateInput.schema';
import { CommissionBatchItemAvgAggregateInputObjectSchema as CommissionBatchItemAvgAggregateInputObjectSchema } from './objects/CommissionBatchItemAvgAggregateInput.schema';
import { CommissionBatchItemSumAggregateInputObjectSchema as CommissionBatchItemSumAggregateInputObjectSchema } from './objects/CommissionBatchItemSumAggregateInput.schema';

export const CommissionBatchItemGroupBySchema: z.ZodType<Prisma.CommissionBatchItemGroupByArgs> = z.object({ where: CommissionBatchItemWhereInputObjectSchema.optional(), orderBy: z.union([CommissionBatchItemOrderByWithAggregationInputObjectSchema, CommissionBatchItemOrderByWithAggregationInputObjectSchema.array()]).optional(), having: CommissionBatchItemScalarWhereWithAggregatesInputObjectSchema.optional(), take: z.number().optional(), skip: z.number().optional(), by: z.array(CommissionBatchItemScalarFieldEnumSchema), _count: z.union([ z.literal(true), CommissionBatchItemCountAggregateInputObjectSchema ]).optional(), _min: CommissionBatchItemMinAggregateInputObjectSchema.optional(), _max: CommissionBatchItemMaxAggregateInputObjectSchema.optional(), _avg: CommissionBatchItemAvgAggregateInputObjectSchema.optional(), _sum: CommissionBatchItemSumAggregateInputObjectSchema.optional() }).strict() as unknown as z.ZodType<Prisma.CommissionBatchItemGroupByArgs>;

export const CommissionBatchItemGroupByZodSchema = z.object({ where: CommissionBatchItemWhereInputObjectSchema.optional(), orderBy: z.union([CommissionBatchItemOrderByWithAggregationInputObjectSchema, CommissionBatchItemOrderByWithAggregationInputObjectSchema.array()]).optional(), having: CommissionBatchItemScalarWhereWithAggregatesInputObjectSchema.optional(), take: z.number().optional(), skip: z.number().optional(), by: z.array(CommissionBatchItemScalarFieldEnumSchema), _count: z.union([ z.literal(true), CommissionBatchItemCountAggregateInputObjectSchema ]).optional(), _min: CommissionBatchItemMinAggregateInputObjectSchema.optional(), _max: CommissionBatchItemMaxAggregateInputObjectSchema.optional(), _avg: CommissionBatchItemAvgAggregateInputObjectSchema.optional(), _sum: CommissionBatchItemSumAggregateInputObjectSchema.optional() }).strict();