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

import { DecimalJSLikeSchema, isValidDecimalInput } from '../../helpers/decimal-helpers';
const makeSchema = () => z.object({
  id: z.number().int().optional(),
  npiProviderId: z.number().int(),
  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(),
  items: z.lazy(() => CommissionBatchItemUncheckedCreateNestedManyWithoutCommissionBatchInputObjectSchema).optional()
}).strict();
export const CommissionBatchUncheckedCreateInputObjectSchema: z.ZodType<Prisma.CommissionBatchUncheckedCreateInput> = makeSchema() as unknown as z.ZodType<Prisma.CommissionBatchUncheckedCreateInput>;
export const CommissionBatchUncheckedCreateInputObjectZodSchema = makeSchema();
