Files
DentalManagementMH07/packages/db/shared/schemas/results/ServiceLineTransactionGroupByResult.schema.ts
Gitead 75ecd7cc20 feat: add Selenium Settings page to configure paymentGroupId per office
Adds a new Settings → Advanced → Selenium Settings page where the office
name (paymentGroupId) used in United/DentalHub portal dropdowns can be
configured without touching code. Previously hardcoded as "Summit Dental
Care"; now injected from DB into the three United workers at job dispatch.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-02 23:53:43 -04:00

66 lines
2.1 KiB
TypeScript

import * as z from 'zod';
export const ServiceLineTransactionGroupByResultSchema = z.array(z.object({
id: z.number().int(),
paymentId: z.number().int(),
serviceLineId: z.number().int(),
transactionId: z.string(),
paidAmount: z.number(),
adjustedAmount: z.number(),
receivedDate: z.date(),
payerName: z.string(),
notes: z.string(),
createdAt: z.date(),
_count: z.object({
id: z.number(),
paymentId: z.number(),
serviceLineId: z.number(),
transactionId: z.number(),
paidAmount: z.number(),
adjustedAmount: z.number(),
method: z.number(),
receivedDate: z.number(),
payerName: z.number(),
notes: z.number(),
createdAt: z.number(),
payment: z.number(),
serviceLine: z.number()
}).optional(),
_sum: z.object({
id: z.number().nullable(),
paymentId: z.number().nullable(),
serviceLineId: z.number().nullable(),
paidAmount: z.number().nullable(),
adjustedAmount: z.number().nullable()
}).nullable().optional(),
_avg: z.object({
id: z.number().nullable(),
paymentId: z.number().nullable(),
serviceLineId: z.number().nullable(),
paidAmount: z.number().nullable(),
adjustedAmount: z.number().nullable()
}).nullable().optional(),
_min: z.object({
id: z.number().int().nullable(),
paymentId: z.number().int().nullable(),
serviceLineId: z.number().int().nullable(),
transactionId: z.string().nullable(),
paidAmount: z.number().nullable(),
adjustedAmount: z.number().nullable(),
receivedDate: z.date().nullable(),
payerName: z.string().nullable(),
notes: z.string().nullable(),
createdAt: z.date().nullable()
}).nullable().optional(),
_max: z.object({
id: z.number().int().nullable(),
paymentId: z.number().int().nullable(),
serviceLineId: z.number().int().nullable(),
transactionId: z.string().nullable(),
paidAmount: z.number().nullable(),
adjustedAmount: z.number().nullable(),
receivedDate: z.date().nullable(),
payerName: z.string().nullable(),
notes: z.string().nullable(),
createdAt: z.date().nullable()
}).nullable().optional()
}));