import * as z from 'zod';
import type { Prisma } from '../../../generated/prisma';
import { IntFieldUpdateOperationsInputObjectSchema as IntFieldUpdateOperationsInputObjectSchema } from './IntFieldUpdateOperationsInput.schema';
import { NullableIntFieldUpdateOperationsInputObjectSchema as NullableIntFieldUpdateOperationsInputObjectSchema } from './NullableIntFieldUpdateOperationsInput.schema';
import { StringFieldUpdateOperationsInputObjectSchema as StringFieldUpdateOperationsInputObjectSchema } from './StringFieldUpdateOperationsInput.schema';
import { DateTimeFieldUpdateOperationsInputObjectSchema as DateTimeFieldUpdateOperationsInputObjectSchema } from './DateTimeFieldUpdateOperationsInput.schema';
import { MissingTeethStatusSchema } from '../enums/MissingTeethStatus.schema';
import { EnumMissingTeethStatusFieldUpdateOperationsInputObjectSchema as EnumMissingTeethStatusFieldUpdateOperationsInputObjectSchema } from './EnumMissingTeethStatusFieldUpdateOperationsInput.schema';
import { NullableJsonNullValueInputSchema } from '../enums/NullableJsonNullValueInput.schema';
import { ClaimStatusSchema } from '../enums/ClaimStatus.schema';
import { EnumClaimStatusFieldUpdateOperationsInputObjectSchema as EnumClaimStatusFieldUpdateOperationsInputObjectSchema } from './EnumClaimStatusFieldUpdateOperationsInput.schema';
import { NullableStringFieldUpdateOperationsInputObjectSchema as NullableStringFieldUpdateOperationsInputObjectSchema } from './NullableStringFieldUpdateOperationsInput.schema';
import { ServiceLineUncheckedUpdateManyWithoutClaimNestedInputObjectSchema as ServiceLineUncheckedUpdateManyWithoutClaimNestedInputObjectSchema } from './ServiceLineUncheckedUpdateManyWithoutClaimNestedInput.schema';
import { ClaimFileUncheckedUpdateManyWithoutClaimNestedInputObjectSchema as ClaimFileUncheckedUpdateManyWithoutClaimNestedInputObjectSchema } from './ClaimFileUncheckedUpdateManyWithoutClaimNestedInput.schema';
import { PaymentUncheckedUpdateOneWithoutClaimNestedInputObjectSchema as PaymentUncheckedUpdateOneWithoutClaimNestedInputObjectSchema } from './PaymentUncheckedUpdateOneWithoutClaimNestedInput.schema'

import { JsonValueSchema as jsonSchema } from '../../helpers/json-helpers';

const makeSchema = () => z.object({
  id: z.union([z.number().int(), z.lazy(() => IntFieldUpdateOperationsInputObjectSchema)]).optional(),
  patientId: z.union([z.number().int(), z.lazy(() => IntFieldUpdateOperationsInputObjectSchema)]).optional(),
  appointmentId: z.union([z.number().int().int(), z.lazy(() => NullableIntFieldUpdateOperationsInputObjectSchema)]).optional().nullable(),
  userId: z.union([z.number().int(), z.lazy(() => IntFieldUpdateOperationsInputObjectSchema)]).optional(),
  staffId: z.union([z.number().int(), z.lazy(() => IntFieldUpdateOperationsInputObjectSchema)]).optional(),
  patientName: z.union([z.string(), z.lazy(() => StringFieldUpdateOperationsInputObjectSchema)]).optional(),
  memberId: z.union([z.string(), z.lazy(() => StringFieldUpdateOperationsInputObjectSchema)]).optional(),
  dateOfBirth: z.union([z.coerce.date(), z.lazy(() => DateTimeFieldUpdateOperationsInputObjectSchema)]).optional(),
  remarks: z.union([z.string(), z.lazy(() => StringFieldUpdateOperationsInputObjectSchema)]).optional(),
  missingTeethStatus: z.union([MissingTeethStatusSchema, z.lazy(() => EnumMissingTeethStatusFieldUpdateOperationsInputObjectSchema)]).optional(),
  missingTeeth: z.union([NullableJsonNullValueInputSchema, jsonSchema]).optional(),
  serviceDate: z.union([z.coerce.date(), z.lazy(() => DateTimeFieldUpdateOperationsInputObjectSchema)]).optional(),
  insuranceProvider: z.union([z.string(), z.lazy(() => StringFieldUpdateOperationsInputObjectSchema)]).optional(),
  createdAt: z.union([z.coerce.date(), z.lazy(() => DateTimeFieldUpdateOperationsInputObjectSchema)]).optional(),
  updatedAt: z.union([z.coerce.date(), z.lazy(() => DateTimeFieldUpdateOperationsInputObjectSchema)]).optional(),
  status: z.union([ClaimStatusSchema, z.lazy(() => EnumClaimStatusFieldUpdateOperationsInputObjectSchema)]).optional(),
  claimNumber: z.union([z.string(), z.lazy(() => NullableStringFieldUpdateOperationsInputObjectSchema)]).optional().nullable(),
  preAuthNumber: z.union([z.string(), z.lazy(() => NullableStringFieldUpdateOperationsInputObjectSchema)]).optional().nullable(),
  npiProviderId: z.union([z.number().int(), z.lazy(() => NullableIntFieldUpdateOperationsInputObjectSchema)]).optional().nullable(),
  serviceLines: z.lazy(() => ServiceLineUncheckedUpdateManyWithoutClaimNestedInputObjectSchema).optional(),
  claimFiles: z.lazy(() => ClaimFileUncheckedUpdateManyWithoutClaimNestedInputObjectSchema).optional(),
  payment: z.lazy(() => PaymentUncheckedUpdateOneWithoutClaimNestedInputObjectSchema).optional()
}).strict();
export const ClaimUncheckedUpdateInputObjectSchema: z.ZodType<Prisma.ClaimUncheckedUpdateInput> = makeSchema() as unknown as z.ZodType<Prisma.ClaimUncheckedUpdateInput>;
export const ClaimUncheckedUpdateInputObjectZodSchema = makeSchema();
