import * as z from 'zod';
import { Prisma } from '../../../generated/prisma';
import Decimal from 'decimal.js';
import { NpiProviderCreateNestedOneWithoutCommissionBatchesInputObjectSchema as NpiProviderCreateNestedOneWithoutCommissionBatchesInputObjectSchema } from './NpiProviderCreateNestedOneWithoutCommissionBatchesInput.schema'

import { DecimalJSLikeSchema, isValidDecimalInput } from '../../helpers/decimal-helpers';
const makeSchema = () => z.object({
  totalCollection: z.union([
  z.number(),
  z.string(),
  z.instanceof(Decimal),
  z.instanceof(Prisma.Decimal),
  DecimalJSLikeSchema,
]).refine((v) => isValidDecimalInput(v), {
  message: "Field 'totalCollection' must be a Decimal",
}),
  commissionAmount: z.union([
  z.number(),
  z.string(),
  z.instanceof(Decimal),
  z.instanceof(Prisma.Decimal),
  DecimalJSLikeSchema,
]).refine((v) => isValidDecimalInput(v), {
  message: "Field 'commissionAmount' must be a Decimal",
}),
  notes: z.string().optional().nullable(),
  createdAt: z.coerce.date().optional(),
  npiProvider: z.lazy(() => NpiProviderCreateNestedOneWithoutCommissionBatchesInputObjectSchema)
}).strict();
export const CommissionBatchCreateWithoutItemsInputObjectSchema: z.ZodType<Prisma.CommissionBatchCreateWithoutItemsInput> = makeSchema() as unknown as z.ZodType<Prisma.CommissionBatchCreateWithoutItemsInput>;
export const CommissionBatchCreateWithoutItemsInputObjectZodSchema = makeSchema();
