27 lines
1.9 KiB
TypeScript
27 lines
1.9 KiB
TypeScript
import * as z from 'zod';
|
|
import type { Prisma } from '../../../generated/prisma';
|
|
import { PatientStatusSchema } from '../enums/PatientStatus.schema';
|
|
import { PatientCreateNestedOneWithoutAppointmentsInputObjectSchema as PatientCreateNestedOneWithoutAppointmentsInputObjectSchema } from './PatientCreateNestedOneWithoutAppointmentsInput.schema';
|
|
import { UserCreateNestedOneWithoutAppointmentsInputObjectSchema as UserCreateNestedOneWithoutAppointmentsInputObjectSchema } from './UserCreateNestedOneWithoutAppointmentsInput.schema';
|
|
import { StaffCreateNestedOneWithoutAppointmentsInputObjectSchema as StaffCreateNestedOneWithoutAppointmentsInputObjectSchema } from './StaffCreateNestedOneWithoutAppointmentsInput.schema';
|
|
import { ClaimCreateNestedManyWithoutAppointmentInputObjectSchema as ClaimCreateNestedManyWithoutAppointmentInputObjectSchema } from './ClaimCreateNestedManyWithoutAppointmentInput.schema'
|
|
|
|
const makeSchema = () => z.object({
|
|
title: z.string(),
|
|
date: z.coerce.date(),
|
|
startTime: z.string(),
|
|
endTime: z.string(),
|
|
type: z.string(),
|
|
notes: z.string().optional().nullable(),
|
|
procedureCodeNotes: z.string().optional().nullable(),
|
|
status: z.string().optional(),
|
|
createdAt: z.coerce.date().optional(),
|
|
eligibilityStatus: PatientStatusSchema.optional(),
|
|
patient: z.lazy(() => PatientCreateNestedOneWithoutAppointmentsInputObjectSchema),
|
|
user: z.lazy(() => UserCreateNestedOneWithoutAppointmentsInputObjectSchema),
|
|
staff: z.lazy(() => StaffCreateNestedOneWithoutAppointmentsInputObjectSchema).optional(),
|
|
claims: z.lazy(() => ClaimCreateNestedManyWithoutAppointmentInputObjectSchema).optional()
|
|
}).strict();
|
|
export const AppointmentCreateWithoutProceduresInputObjectSchema: z.ZodType<Prisma.AppointmentCreateWithoutProceduresInput> = makeSchema() as unknown as z.ZodType<Prisma.AppointmentCreateWithoutProceduresInput>;
|
|
export const AppointmentCreateWithoutProceduresInputObjectZodSchema = makeSchema();
|