initial commit
This commit is contained in:
@@ -0,0 +1,79 @@
|
||||
import * as z from 'zod';
|
||||
import type { Prisma } from '../../../generated/prisma';
|
||||
import { IntFilterObjectSchema as IntFilterObjectSchema } from './IntFilter.schema';
|
||||
import { IntNullableFilterObjectSchema as IntNullableFilterObjectSchema } from './IntNullableFilter.schema';
|
||||
import { DecimalFilterObjectSchema as DecimalFilterObjectSchema } from './DecimalFilter.schema';
|
||||
import { EnumPaymentStatusFilterObjectSchema as EnumPaymentStatusFilterObjectSchema } from './EnumPaymentStatusFilter.schema';
|
||||
import { PaymentStatusSchema } from '../enums/PaymentStatus.schema';
|
||||
import { StringNullableFilterObjectSchema as StringNullableFilterObjectSchema } from './StringNullableFilter.schema';
|
||||
import { DateTimeFilterObjectSchema as DateTimeFilterObjectSchema } from './DateTimeFilter.schema';
|
||||
import { ClaimNullableScalarRelationFilterObjectSchema as ClaimNullableScalarRelationFilterObjectSchema } from './ClaimNullableScalarRelationFilter.schema';
|
||||
import { ClaimWhereInputObjectSchema as ClaimWhereInputObjectSchema } from './ClaimWhereInput.schema';
|
||||
import { PatientScalarRelationFilterObjectSchema as PatientScalarRelationFilterObjectSchema } from './PatientScalarRelationFilter.schema';
|
||||
import { PatientWhereInputObjectSchema as PatientWhereInputObjectSchema } from './PatientWhereInput.schema';
|
||||
import { UserNullableScalarRelationFilterObjectSchema as UserNullableScalarRelationFilterObjectSchema } from './UserNullableScalarRelationFilter.schema';
|
||||
import { UserWhereInputObjectSchema as UserWhereInputObjectSchema } from './UserWhereInput.schema';
|
||||
import { ServiceLineTransactionListRelationFilterObjectSchema as ServiceLineTransactionListRelationFilterObjectSchema } from './ServiceLineTransactionListRelationFilter.schema';
|
||||
import { ServiceLineListRelationFilterObjectSchema as ServiceLineListRelationFilterObjectSchema } from './ServiceLineListRelationFilter.schema'
|
||||
|
||||
import { DecimalJSLikeSchema, isValidDecimalInput } from '../../helpers/decimal-helpers';
|
||||
|
||||
import Decimal from "decimal.js";
|
||||
const paymentwhereinputSchema = z.object({
|
||||
AND: z.union([z.lazy(() => PaymentWhereInputObjectSchema), z.lazy(() => PaymentWhereInputObjectSchema).array()]).optional(),
|
||||
OR: z.lazy(() => PaymentWhereInputObjectSchema).array().optional(),
|
||||
NOT: z.union([z.lazy(() => PaymentWhereInputObjectSchema), z.lazy(() => PaymentWhereInputObjectSchema).array()]).optional(),
|
||||
id: z.union([z.lazy(() => IntFilterObjectSchema), z.number().int()]).optional(),
|
||||
claimId: z.union([z.lazy(() => IntNullableFilterObjectSchema), z.number().int()]).optional().nullable(),
|
||||
patientId: z.union([z.lazy(() => IntFilterObjectSchema), z.number().int()]).optional(),
|
||||
userId: z.union([z.lazy(() => IntFilterObjectSchema), z.number().int()]).optional(),
|
||||
updatedById: z.union([z.lazy(() => IntNullableFilterObjectSchema), z.number().int()]).optional().nullable(),
|
||||
totalBilled: z.union([z.lazy(() => DecimalFilterObjectSchema), z.union([
|
||||
z.number(),
|
||||
z.string(),
|
||||
z.instanceof(Decimal),
|
||||
z.instanceof(Decimal),
|
||||
DecimalJSLikeSchema,
|
||||
]).refine((v) => isValidDecimalInput(v), {
|
||||
message: "Field 'totalBilled' must be a Decimal",
|
||||
})]).optional(),
|
||||
totalPaid: z.union([z.lazy(() => DecimalFilterObjectSchema), z.union([
|
||||
z.number(),
|
||||
z.string(),
|
||||
z.instanceof(Decimal),
|
||||
z.instanceof(Decimal),
|
||||
DecimalJSLikeSchema,
|
||||
]).refine((v) => isValidDecimalInput(v), {
|
||||
message: "Field 'totalPaid' must be a Decimal",
|
||||
})]).optional(),
|
||||
totalAdjusted: z.union([z.lazy(() => DecimalFilterObjectSchema), z.union([
|
||||
z.number(),
|
||||
z.string(),
|
||||
z.instanceof(Decimal),
|
||||
z.instanceof(Decimal),
|
||||
DecimalJSLikeSchema,
|
||||
]).refine((v) => isValidDecimalInput(v), {
|
||||
message: "Field 'totalAdjusted' must be a Decimal",
|
||||
})]).optional(),
|
||||
totalDue: z.union([z.lazy(() => DecimalFilterObjectSchema), z.union([
|
||||
z.number(),
|
||||
z.string(),
|
||||
z.instanceof(Decimal),
|
||||
z.instanceof(Decimal),
|
||||
DecimalJSLikeSchema,
|
||||
]).refine((v) => isValidDecimalInput(v), {
|
||||
message: "Field 'totalDue' must be a Decimal",
|
||||
})]).optional(),
|
||||
status: z.union([z.lazy(() => EnumPaymentStatusFilterObjectSchema), PaymentStatusSchema]).optional(),
|
||||
notes: z.union([z.lazy(() => StringNullableFilterObjectSchema), z.string()]).optional().nullable(),
|
||||
icn: z.union([z.lazy(() => StringNullableFilterObjectSchema), z.string()]).optional().nullable(),
|
||||
createdAt: z.union([z.lazy(() => DateTimeFilterObjectSchema), z.coerce.date()]).optional(),
|
||||
updatedAt: z.union([z.lazy(() => DateTimeFilterObjectSchema), z.coerce.date()]).optional(),
|
||||
claim: z.union([z.lazy(() => ClaimNullableScalarRelationFilterObjectSchema), z.lazy(() => ClaimWhereInputObjectSchema)]).optional(),
|
||||
patient: z.union([z.lazy(() => PatientScalarRelationFilterObjectSchema), z.lazy(() => PatientWhereInputObjectSchema)]).optional(),
|
||||
updatedBy: z.union([z.lazy(() => UserNullableScalarRelationFilterObjectSchema), z.lazy(() => UserWhereInputObjectSchema)]).optional(),
|
||||
serviceLineTransactions: z.lazy(() => ServiceLineTransactionListRelationFilterObjectSchema).optional(),
|
||||
serviceLines: z.lazy(() => ServiceLineListRelationFilterObjectSchema).optional()
|
||||
}).strict();
|
||||
export const PaymentWhereInputObjectSchema: z.ZodType<Prisma.PaymentWhereInput> = paymentwhereinputSchema as unknown as z.ZodType<Prisma.PaymentWhereInput>;
|
||||
export const PaymentWhereInputObjectZodSchema = paymentwhereinputSchema;
|
||||
Reference in New Issue
Block a user