import * as z from 'zod';
import { Prisma } from '../../../generated/prisma';
import Decimal from 'decimal.js';
import { NpiProviderCreateNestedOneWithoutCommissionBatchesInputObjectSchema as NpiProviderCreateNestedOneWithoutCommissionBatchesInputObjectSchema } from './NpiProviderCreateNestedOneWithoutCommissionBatchesInput.schema';
import { CommissionBatchItemCreateNestedManyWithoutCommissionBatchInputObjectSchema as CommissionBatchItemCreateNestedManyWithoutCommissionBatchInputObjectSchema } from './CommissionBatchItemCreateNestedManyWithoutCommissionBatchInput.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),
  items: z.lazy(() => CommissionBatchItemCreateNestedManyWithoutCommissionBatchInputObjectSchema).optional()
}).strict();
export const CommissionBatchCreateInputObjectSchema: z.ZodType<Prisma.CommissionBatchCreateInput> = makeSchema() as unknown as z.ZodType<Prisma.CommissionBatchCreateInput>;
export const CommissionBatchCreateInputObjectZodSchema = makeSchema();
