- Add movedByAi boolean column to Appointment table (default false) - reschedule-graph: set movedByAi=true when AI moves an appointment - PATCH /api/appointments/:id/confirm endpoint clears the movedByAi flag - Schedule grid: show teal AI badge on appointment cards where movedByAi=true - Right-click context menu: 'Manually Confirmed' removes the AI badge via the confirm endpoint Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
33 lines
2.8 KiB
TypeScript
33 lines
2.8 KiB
TypeScript
import * as z from 'zod';
|
|
import type { Prisma } from '../../../generated/prisma';
|
|
import { IntFilterObjectSchema as IntFilterObjectSchema } from './IntFilter.schema';
|
|
import { StringFilterObjectSchema as StringFilterObjectSchema } from './StringFilter.schema';
|
|
import { DateTimeFilterObjectSchema as DateTimeFilterObjectSchema } from './DateTimeFilter.schema';
|
|
import { StringNullableFilterObjectSchema as StringNullableFilterObjectSchema } from './StringNullableFilter.schema';
|
|
import { BoolFilterObjectSchema as BoolFilterObjectSchema } from './BoolFilter.schema';
|
|
import { EnumPatientStatusFilterObjectSchema as EnumPatientStatusFilterObjectSchema } from './EnumPatientStatusFilter.schema';
|
|
import { PatientStatusSchema } from '../enums/PatientStatus.schema'
|
|
|
|
const appointmentscalarwhereinputSchema = z.object({
|
|
AND: z.union([z.lazy(() => AppointmentScalarWhereInputObjectSchema), z.lazy(() => AppointmentScalarWhereInputObjectSchema).array()]).optional(),
|
|
OR: z.lazy(() => AppointmentScalarWhereInputObjectSchema).array().optional(),
|
|
NOT: z.union([z.lazy(() => AppointmentScalarWhereInputObjectSchema), z.lazy(() => AppointmentScalarWhereInputObjectSchema).array()]).optional(),
|
|
id: z.union([z.lazy(() => IntFilterObjectSchema), z.number().int()]).optional(),
|
|
patientId: z.union([z.lazy(() => IntFilterObjectSchema), z.number().int()]).optional(),
|
|
userId: z.union([z.lazy(() => IntFilterObjectSchema), z.number().int()]).optional(),
|
|
staffId: z.union([z.lazy(() => IntFilterObjectSchema), z.number().int()]).optional(),
|
|
title: z.union([z.lazy(() => StringFilterObjectSchema), z.string()]).optional(),
|
|
date: z.union([z.lazy(() => DateTimeFilterObjectSchema), z.coerce.date()]).optional(),
|
|
startTime: z.union([z.lazy(() => StringFilterObjectSchema), z.string()]).optional(),
|
|
endTime: z.union([z.lazy(() => StringFilterObjectSchema), z.string()]).optional(),
|
|
type: z.union([z.lazy(() => StringFilterObjectSchema), z.string()]).optional(),
|
|
notes: z.union([z.lazy(() => StringNullableFilterObjectSchema), z.string()]).optional().nullable(),
|
|
procedureCodeNotes: z.union([z.lazy(() => StringNullableFilterObjectSchema), z.string()]).optional().nullable(),
|
|
status: z.union([z.lazy(() => StringFilterObjectSchema), z.string()]).optional(),
|
|
movedByAi: z.union([z.lazy(() => BoolFilterObjectSchema), z.boolean()]).optional(),
|
|
createdAt: z.union([z.lazy(() => DateTimeFilterObjectSchema), z.coerce.date()]).optional(),
|
|
eligibilityStatus: z.union([z.lazy(() => EnumPatientStatusFilterObjectSchema), PatientStatusSchema]).optional()
|
|
}).strict();
|
|
export const AppointmentScalarWhereInputObjectSchema: z.ZodType<Prisma.AppointmentScalarWhereInput> = appointmentscalarwhereinputSchema as unknown as z.ZodType<Prisma.AppointmentScalarWhereInput>;
|
|
export const AppointmentScalarWhereInputObjectZodSchema = appointmentscalarwhereinputSchema;
|