import type { Prisma } from '../../generated/prisma';
import * as z from 'zod';
import { CommissionBatchWhereInputObjectSchema as CommissionBatchWhereInputObjectSchema } from './objects/CommissionBatchWhereInput.schema';
import { CommissionBatchOrderByWithAggregationInputObjectSchema as CommissionBatchOrderByWithAggregationInputObjectSchema } from './objects/CommissionBatchOrderByWithAggregationInput.schema';
import { CommissionBatchScalarWhereWithAggregatesInputObjectSchema as CommissionBatchScalarWhereWithAggregatesInputObjectSchema } from './objects/CommissionBatchScalarWhereWithAggregatesInput.schema';
import { CommissionBatchScalarFieldEnumSchema } from './enums/CommissionBatchScalarFieldEnum.schema';
import { CommissionBatchCountAggregateInputObjectSchema as CommissionBatchCountAggregateInputObjectSchema } from './objects/CommissionBatchCountAggregateInput.schema';
import { CommissionBatchMinAggregateInputObjectSchema as CommissionBatchMinAggregateInputObjectSchema } from './objects/CommissionBatchMinAggregateInput.schema';
import { CommissionBatchMaxAggregateInputObjectSchema as CommissionBatchMaxAggregateInputObjectSchema } from './objects/CommissionBatchMaxAggregateInput.schema';
import { CommissionBatchAvgAggregateInputObjectSchema as CommissionBatchAvgAggregateInputObjectSchema } from './objects/CommissionBatchAvgAggregateInput.schema';
import { CommissionBatchSumAggregateInputObjectSchema as CommissionBatchSumAggregateInputObjectSchema } from './objects/CommissionBatchSumAggregateInput.schema';

export const CommissionBatchGroupBySchema: z.ZodType<Prisma.CommissionBatchGroupByArgs> = z.object({ where: CommissionBatchWhereInputObjectSchema.optional(), orderBy: z.union([CommissionBatchOrderByWithAggregationInputObjectSchema, CommissionBatchOrderByWithAggregationInputObjectSchema.array()]).optional(), having: CommissionBatchScalarWhereWithAggregatesInputObjectSchema.optional(), take: z.number().optional(), skip: z.number().optional(), by: z.array(CommissionBatchScalarFieldEnumSchema), _count: z.union([ z.literal(true), CommissionBatchCountAggregateInputObjectSchema ]).optional(), _min: CommissionBatchMinAggregateInputObjectSchema.optional(), _max: CommissionBatchMaxAggregateInputObjectSchema.optional(), _avg: CommissionBatchAvgAggregateInputObjectSchema.optional(), _sum: CommissionBatchSumAggregateInputObjectSchema.optional() }).strict() as unknown as z.ZodType<Prisma.CommissionBatchGroupByArgs>;

export const CommissionBatchGroupByZodSchema = z.object({ where: CommissionBatchWhereInputObjectSchema.optional(), orderBy: z.union([CommissionBatchOrderByWithAggregationInputObjectSchema, CommissionBatchOrderByWithAggregationInputObjectSchema.array()]).optional(), having: CommissionBatchScalarWhereWithAggregatesInputObjectSchema.optional(), take: z.number().optional(), skip: z.number().optional(), by: z.array(CommissionBatchScalarFieldEnumSchema), _count: z.union([ z.literal(true), CommissionBatchCountAggregateInputObjectSchema ]).optional(), _min: CommissionBatchMinAggregateInputObjectSchema.optional(), _max: CommissionBatchMaxAggregateInputObjectSchema.optional(), _avg: CommissionBatchAvgAggregateInputObjectSchema.optional(), _sum: CommissionBatchSumAggregateInputObjectSchema.optional() }).strict();