- New lab_rx_template table with sortOrder and Prisma migrations - Backend CRUD + reorder routes at /api/lab-rx/templates - Auto-seeds 3 Highland Dental Studio defaults on first use per user - LabRxModal: template picker, inline rename, up/down reorder, full template form with sections (Template Name / Lab Info / Case Details) - RX popup: Tooth Number, Shade, Due Date, Doctor (from NPI providers), Instructions pre-filled with "Please make / Thank you!", print output - lab-rx-templates.ts config file for future git-managed additions Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
35 lines
2.9 KiB
TypeScript
35 lines
2.9 KiB
TypeScript
import * as z from 'zod';
|
|
import type { Prisma } from '../../../generated/prisma';
|
|
import { SortOrderSchema } from '../enums/SortOrder.schema';
|
|
import { SortOrderInputObjectSchema as SortOrderInputObjectSchema } from './SortOrderInput.schema';
|
|
import { LabRxTemplateCountOrderByAggregateInputObjectSchema as LabRxTemplateCountOrderByAggregateInputObjectSchema } from './LabRxTemplateCountOrderByAggregateInput.schema';
|
|
import { LabRxTemplateAvgOrderByAggregateInputObjectSchema as LabRxTemplateAvgOrderByAggregateInputObjectSchema } from './LabRxTemplateAvgOrderByAggregateInput.schema';
|
|
import { LabRxTemplateMaxOrderByAggregateInputObjectSchema as LabRxTemplateMaxOrderByAggregateInputObjectSchema } from './LabRxTemplateMaxOrderByAggregateInput.schema';
|
|
import { LabRxTemplateMinOrderByAggregateInputObjectSchema as LabRxTemplateMinOrderByAggregateInputObjectSchema } from './LabRxTemplateMinOrderByAggregateInput.schema';
|
|
import { LabRxTemplateSumOrderByAggregateInputObjectSchema as LabRxTemplateSumOrderByAggregateInputObjectSchema } from './LabRxTemplateSumOrderByAggregateInput.schema'
|
|
|
|
const makeSchema = () => z.object({
|
|
id: SortOrderSchema.optional(),
|
|
userId: SortOrderSchema.optional(),
|
|
name: SortOrderSchema.optional(),
|
|
labName: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
|
|
labPhone: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
|
|
labFax: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
|
|
labAddress: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
|
|
labAccount: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
|
|
caseType: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
|
|
material: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
|
|
instructions: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
|
|
doctorName: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
|
|
sortOrder: SortOrderSchema.optional(),
|
|
createdAt: SortOrderSchema.optional(),
|
|
updatedAt: SortOrderSchema.optional(),
|
|
_count: z.lazy(() => LabRxTemplateCountOrderByAggregateInputObjectSchema).optional(),
|
|
_avg: z.lazy(() => LabRxTemplateAvgOrderByAggregateInputObjectSchema).optional(),
|
|
_max: z.lazy(() => LabRxTemplateMaxOrderByAggregateInputObjectSchema).optional(),
|
|
_min: z.lazy(() => LabRxTemplateMinOrderByAggregateInputObjectSchema).optional(),
|
|
_sum: z.lazy(() => LabRxTemplateSumOrderByAggregateInputObjectSchema).optional()
|
|
}).strict();
|
|
export const LabRxTemplateOrderByWithAggregationInputObjectSchema: z.ZodType<Prisma.LabRxTemplateOrderByWithAggregationInput> = makeSchema() as unknown as z.ZodType<Prisma.LabRxTemplateOrderByWithAggregationInput>;
|
|
export const LabRxTemplateOrderByWithAggregationInputObjectZodSchema = makeSchema();
|