feat: add Copayment and Adjustment columns to payments table

- Added copayment and adjustment fields (Decimal, default 0) to Payment
  model in schema and directly to DB via ALTER TABLE
- Added PATCH /api/payments/:id/copayment and /adjustment routes
- Added inline-editable Copayment and Adjustment columns after MH Paid
  with same click-to-edit format; Copayment in blue, Adjustment in orange

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Gitead
2026-05-06 21:14:00 -04:00
parent c5af6c1fa6
commit 4bd501250d
250 changed files with 4656 additions and 185 deletions

View File

@@ -1,7 +1,7 @@
{
"version": "1.0",
"generatorVersion": "1.0.0",
"generatedAt": "2026-05-06T01:11:22.105Z",
"generatedAt": "2026-05-07T01:12:17.979Z",
"outputPath": "/home/ee/Desktop/DentalManagementMH05/packages/db/shared",
"files": [
"schemas/enums/TransactionIsolationLevel.schema.ts",
@@ -33,6 +33,7 @@
"schemas/enums/AiSettingsScalarFieldEnum.schema.ts",
"schemas/enums/OfficeHoursScalarFieldEnum.schema.ts",
"schemas/enums/OfficeContactScalarFieldEnum.schema.ts",
"schemas/enums/ProcedureTimeslotScalarFieldEnum.schema.ts",
"schemas/enums/SortOrder.schema.ts",
"schemas/enums/NullableJsonNullValueInput.schema.ts",
"schemas/enums/JsonNullValueInput.schema.ts",
@@ -191,6 +192,11 @@
"schemas/objects/OfficeContactWhereUniqueInput.schema.ts",
"schemas/objects/OfficeContactOrderByWithAggregationInput.schema.ts",
"schemas/objects/OfficeContactScalarWhereWithAggregatesInput.schema.ts",
"schemas/objects/ProcedureTimeslotWhereInput.schema.ts",
"schemas/objects/ProcedureTimeslotOrderByWithRelationInput.schema.ts",
"schemas/objects/ProcedureTimeslotWhereUniqueInput.schema.ts",
"schemas/objects/ProcedureTimeslotOrderByWithAggregationInput.schema.ts",
"schemas/objects/ProcedureTimeslotScalarWhereWithAggregatesInput.schema.ts",
"schemas/objects/UserCreateInput.schema.ts",
"schemas/objects/UserUncheckedCreateInput.schema.ts",
"schemas/objects/UserUpdateInput.schema.ts",
@@ -387,6 +393,13 @@
"schemas/objects/OfficeContactCreateManyInput.schema.ts",
"schemas/objects/OfficeContactUpdateManyMutationInput.schema.ts",
"schemas/objects/OfficeContactUncheckedUpdateManyInput.schema.ts",
"schemas/objects/ProcedureTimeslotCreateInput.schema.ts",
"schemas/objects/ProcedureTimeslotUncheckedCreateInput.schema.ts",
"schemas/objects/ProcedureTimeslotUpdateInput.schema.ts",
"schemas/objects/ProcedureTimeslotUncheckedUpdateInput.schema.ts",
"schemas/objects/ProcedureTimeslotCreateManyInput.schema.ts",
"schemas/objects/ProcedureTimeslotUpdateManyMutationInput.schema.ts",
"schemas/objects/ProcedureTimeslotUncheckedUpdateManyInput.schema.ts",
"schemas/objects/IntFilter.schema.ts",
"schemas/objects/StringFilter.schema.ts",
"schemas/objects/BoolFilter.schema.ts",
@@ -407,6 +420,7 @@
"schemas/objects/AiSettingsNullableScalarRelationFilter.schema.ts",
"schemas/objects/OfficeHoursNullableScalarRelationFilter.schema.ts",
"schemas/objects/OfficeContactNullableScalarRelationFilter.schema.ts",
"schemas/objects/ProcedureTimeslotNullableScalarRelationFilter.schema.ts",
"schemas/objects/PatientOrderByRelationAggregateInput.schema.ts",
"schemas/objects/AppointmentOrderByRelationAggregateInput.schema.ts",
"schemas/objects/StaffOrderByRelationAggregateInput.schema.ts",
@@ -644,6 +658,11 @@
"schemas/objects/OfficeContactMaxOrderByAggregateInput.schema.ts",
"schemas/objects/OfficeContactMinOrderByAggregateInput.schema.ts",
"schemas/objects/OfficeContactSumOrderByAggregateInput.schema.ts",
"schemas/objects/ProcedureTimeslotCountOrderByAggregateInput.schema.ts",
"schemas/objects/ProcedureTimeslotAvgOrderByAggregateInput.schema.ts",
"schemas/objects/ProcedureTimeslotMaxOrderByAggregateInput.schema.ts",
"schemas/objects/ProcedureTimeslotMinOrderByAggregateInput.schema.ts",
"schemas/objects/ProcedureTimeslotSumOrderByAggregateInput.schema.ts",
"schemas/objects/PatientCreateNestedManyWithoutUserInput.schema.ts",
"schemas/objects/AppointmentCreateNestedManyWithoutUserInput.schema.ts",
"schemas/objects/StaffCreateNestedManyWithoutUserInput.schema.ts",
@@ -661,6 +680,7 @@
"schemas/objects/AiSettingsCreateNestedOneWithoutUserInput.schema.ts",
"schemas/objects/OfficeHoursCreateNestedOneWithoutUserInput.schema.ts",
"schemas/objects/OfficeContactCreateNestedOneWithoutUserInput.schema.ts",
"schemas/objects/ProcedureTimeslotCreateNestedOneWithoutUserInput.schema.ts",
"schemas/objects/PatientUncheckedCreateNestedManyWithoutUserInput.schema.ts",
"schemas/objects/AppointmentUncheckedCreateNestedManyWithoutUserInput.schema.ts",
"schemas/objects/StaffUncheckedCreateNestedManyWithoutUserInput.schema.ts",
@@ -678,6 +698,7 @@
"schemas/objects/AiSettingsUncheckedCreateNestedOneWithoutUserInput.schema.ts",
"schemas/objects/OfficeHoursUncheckedCreateNestedOneWithoutUserInput.schema.ts",
"schemas/objects/OfficeContactUncheckedCreateNestedOneWithoutUserInput.schema.ts",
"schemas/objects/ProcedureTimeslotUncheckedCreateNestedOneWithoutUserInput.schema.ts",
"schemas/objects/StringFieldUpdateOperationsInput.schema.ts",
"schemas/objects/BoolFieldUpdateOperationsInput.schema.ts",
"schemas/objects/PatientUpdateManyWithoutUserNestedInput.schema.ts",
@@ -697,6 +718,7 @@
"schemas/objects/AiSettingsUpdateOneWithoutUserNestedInput.schema.ts",
"schemas/objects/OfficeHoursUpdateOneWithoutUserNestedInput.schema.ts",
"schemas/objects/OfficeContactUpdateOneWithoutUserNestedInput.schema.ts",
"schemas/objects/ProcedureTimeslotUpdateOneWithoutUserNestedInput.schema.ts",
"schemas/objects/IntFieldUpdateOperationsInput.schema.ts",
"schemas/objects/PatientUncheckedUpdateManyWithoutUserNestedInput.schema.ts",
"schemas/objects/AppointmentUncheckedUpdateManyWithoutUserNestedInput.schema.ts",
@@ -715,6 +737,7 @@
"schemas/objects/AiSettingsUncheckedUpdateOneWithoutUserNestedInput.schema.ts",
"schemas/objects/OfficeHoursUncheckedUpdateOneWithoutUserNestedInput.schema.ts",
"schemas/objects/OfficeContactUncheckedUpdateOneWithoutUserNestedInput.schema.ts",
"schemas/objects/ProcedureTimeslotUncheckedUpdateOneWithoutUserNestedInput.schema.ts",
"schemas/objects/UserCreateNestedOneWithoutPatientsInput.schema.ts",
"schemas/objects/AppointmentCreateNestedManyWithoutPatientInput.schema.ts",
"schemas/objects/AppointmentProcedureCreateNestedManyWithoutPatientInput.schema.ts",
@@ -913,6 +936,8 @@
"schemas/objects/UserUpdateOneRequiredWithoutOfficeHoursNestedInput.schema.ts",
"schemas/objects/UserCreateNestedOneWithoutOfficeContactInput.schema.ts",
"schemas/objects/UserUpdateOneRequiredWithoutOfficeContactNestedInput.schema.ts",
"schemas/objects/UserCreateNestedOneWithoutProcedureTimeslotInput.schema.ts",
"schemas/objects/UserUpdateOneRequiredWithoutProcedureTimeslotNestedInput.schema.ts",
"schemas/objects/NestedIntFilter.schema.ts",
"schemas/objects/NestedStringFilter.schema.ts",
"schemas/objects/NestedBoolFilter.schema.ts",
@@ -1027,6 +1052,9 @@
"schemas/objects/OfficeContactCreateWithoutUserInput.schema.ts",
"schemas/objects/OfficeContactUncheckedCreateWithoutUserInput.schema.ts",
"schemas/objects/OfficeContactCreateOrConnectWithoutUserInput.schema.ts",
"schemas/objects/ProcedureTimeslotCreateWithoutUserInput.schema.ts",
"schemas/objects/ProcedureTimeslotUncheckedCreateWithoutUserInput.schema.ts",
"schemas/objects/ProcedureTimeslotCreateOrConnectWithoutUserInput.schema.ts",
"schemas/objects/PatientUpsertWithWhereUniqueWithoutUserInput.schema.ts",
"schemas/objects/PatientUpdateWithWhereUniqueWithoutUserInput.schema.ts",
"schemas/objects/PatientUpdateManyWithWhereWithoutUserInput.schema.ts",
@@ -1095,6 +1123,10 @@
"schemas/objects/OfficeContactUpdateToOneWithWhereWithoutUserInput.schema.ts",
"schemas/objects/OfficeContactUpdateWithoutUserInput.schema.ts",
"schemas/objects/OfficeContactUncheckedUpdateWithoutUserInput.schema.ts",
"schemas/objects/ProcedureTimeslotUpsertWithoutUserInput.schema.ts",
"schemas/objects/ProcedureTimeslotUpdateToOneWithWhereWithoutUserInput.schema.ts",
"schemas/objects/ProcedureTimeslotUpdateWithoutUserInput.schema.ts",
"schemas/objects/ProcedureTimeslotUncheckedUpdateWithoutUserInput.schema.ts",
"schemas/objects/UserCreateWithoutPatientsInput.schema.ts",
"schemas/objects/UserUncheckedCreateWithoutPatientsInput.schema.ts",
"schemas/objects/UserCreateOrConnectWithoutPatientsInput.schema.ts",
@@ -1559,6 +1591,13 @@
"schemas/objects/UserUpdateToOneWithWhereWithoutOfficeContactInput.schema.ts",
"schemas/objects/UserUpdateWithoutOfficeContactInput.schema.ts",
"schemas/objects/UserUncheckedUpdateWithoutOfficeContactInput.schema.ts",
"schemas/objects/UserCreateWithoutProcedureTimeslotInput.schema.ts",
"schemas/objects/UserUncheckedCreateWithoutProcedureTimeslotInput.schema.ts",
"schemas/objects/UserCreateOrConnectWithoutProcedureTimeslotInput.schema.ts",
"schemas/objects/UserUpsertWithoutProcedureTimeslotInput.schema.ts",
"schemas/objects/UserUpdateToOneWithWhereWithoutProcedureTimeslotInput.schema.ts",
"schemas/objects/UserUpdateWithoutProcedureTimeslotInput.schema.ts",
"schemas/objects/UserUncheckedUpdateWithoutProcedureTimeslotInput.schema.ts",
"schemas/objects/PatientCreateManyUserInput.schema.ts",
"schemas/objects/AppointmentCreateManyUserInput.schema.ts",
"schemas/objects/StaffCreateManyUserInput.schema.ts",
@@ -1843,6 +1882,11 @@
"schemas/objects/OfficeContactSumAggregateInput.schema.ts",
"schemas/objects/OfficeContactMinAggregateInput.schema.ts",
"schemas/objects/OfficeContactMaxAggregateInput.schema.ts",
"schemas/objects/ProcedureTimeslotCountAggregateInput.schema.ts",
"schemas/objects/ProcedureTimeslotAvgAggregateInput.schema.ts",
"schemas/objects/ProcedureTimeslotSumAggregateInput.schema.ts",
"schemas/objects/ProcedureTimeslotMinAggregateInput.schema.ts",
"schemas/objects/ProcedureTimeslotMaxAggregateInput.schema.ts",
"schemas/objects/UserCountOutputTypeSelect.schema.ts",
"schemas/objects/PatientCountOutputTypeSelect.schema.ts",
"schemas/objects/AppointmentCountOutputTypeSelect.schema.ts",
@@ -1929,6 +1973,7 @@
"schemas/objects/AiSettingsSelect.schema.ts",
"schemas/objects/OfficeHoursSelect.schema.ts",
"schemas/objects/OfficeContactSelect.schema.ts",
"schemas/objects/ProcedureTimeslotSelect.schema.ts",
"schemas/objects/UserArgs.schema.ts",
"schemas/objects/PatientArgs.schema.ts",
"schemas/objects/AppointmentArgs.schema.ts",
@@ -1957,6 +2002,7 @@
"schemas/objects/AiSettingsArgs.schema.ts",
"schemas/objects/OfficeHoursArgs.schema.ts",
"schemas/objects/OfficeContactArgs.schema.ts",
"schemas/objects/ProcedureTimeslotArgs.schema.ts",
"schemas/objects/UserInclude.schema.ts",
"schemas/objects/PatientInclude.schema.ts",
"schemas/objects/AppointmentInclude.schema.ts",
@@ -1984,6 +2030,7 @@
"schemas/objects/AiSettingsInclude.schema.ts",
"schemas/objects/OfficeHoursInclude.schema.ts",
"schemas/objects/OfficeContactInclude.schema.ts",
"schemas/objects/ProcedureTimeslotInclude.schema.ts",
"schemas/findUniqueUser.schema.ts",
"schemas/findUniqueOrThrowUser.schema.ts",
"schemas/findFirstUser.schema.ts",
@@ -2460,6 +2507,23 @@
"schemas/upsertOneOfficeContact.schema.ts",
"schemas/aggregateOfficeContact.schema.ts",
"schemas/groupByOfficeContact.schema.ts",
"schemas/findUniqueProcedureTimeslot.schema.ts",
"schemas/findUniqueOrThrowProcedureTimeslot.schema.ts",
"schemas/findFirstProcedureTimeslot.schema.ts",
"schemas/findFirstOrThrowProcedureTimeslot.schema.ts",
"schemas/findManyProcedureTimeslot.schema.ts",
"schemas/countProcedureTimeslot.schema.ts",
"schemas/createOneProcedureTimeslot.schema.ts",
"schemas/createManyProcedureTimeslot.schema.ts",
"schemas/createManyAndReturnProcedureTimeslot.schema.ts",
"schemas/deleteOneProcedureTimeslot.schema.ts",
"schemas/deleteManyProcedureTimeslot.schema.ts",
"schemas/updateOneProcedureTimeslot.schema.ts",
"schemas/updateManyProcedureTimeslot.schema.ts",
"schemas/updateManyAndReturnProcedureTimeslot.schema.ts",
"schemas/upsertOneProcedureTimeslot.schema.ts",
"schemas/aggregateProcedureTimeslot.schema.ts",
"schemas/groupByProcedureTimeslot.schema.ts",
"schemas/results/UserFindUniqueResult.schema.ts",
"schemas/results/UserFindFirstResult.schema.ts",
"schemas/results/UserFindManyResult.schema.ts",
@@ -2824,6 +2888,19 @@
"schemas/results/OfficeContactAggregateResult.schema.ts",
"schemas/results/OfficeContactGroupByResult.schema.ts",
"schemas/results/OfficeContactCountResult.schema.ts",
"schemas/results/ProcedureTimeslotFindUniqueResult.schema.ts",
"schemas/results/ProcedureTimeslotFindFirstResult.schema.ts",
"schemas/results/ProcedureTimeslotFindManyResult.schema.ts",
"schemas/results/ProcedureTimeslotCreateResult.schema.ts",
"schemas/results/ProcedureTimeslotCreateManyResult.schema.ts",
"schemas/results/ProcedureTimeslotUpdateResult.schema.ts",
"schemas/results/ProcedureTimeslotUpdateManyResult.schema.ts",
"schemas/results/ProcedureTimeslotUpsertResult.schema.ts",
"schemas/results/ProcedureTimeslotDeleteResult.schema.ts",
"schemas/results/ProcedureTimeslotDeleteManyResult.schema.ts",
"schemas/results/ProcedureTimeslotAggregateResult.schema.ts",
"schemas/results/ProcedureTimeslotGroupByResult.schema.ts",
"schemas/results/ProcedureTimeslotCountResult.schema.ts",
"schemas/results/index.ts",
"schemas/index.ts",
"schemas/variants/pure/User.pure.ts",
@@ -2854,6 +2931,7 @@
"schemas/variants/pure/AiSettings.pure.ts",
"schemas/variants/pure/OfficeHours.pure.ts",
"schemas/variants/pure/OfficeContact.pure.ts",
"schemas/variants/pure/ProcedureTimeslot.pure.ts",
"schemas/variants/pure/index.ts",
"schemas/variants/input/User.input.ts",
"schemas/variants/input/Patient.input.ts",
@@ -2883,6 +2961,7 @@
"schemas/variants/input/AiSettings.input.ts",
"schemas/variants/input/OfficeHours.input.ts",
"schemas/variants/input/OfficeContact.input.ts",
"schemas/variants/input/ProcedureTimeslot.input.ts",
"schemas/variants/input/index.ts",
"schemas/variants/result/User.result.ts",
"schemas/variants/result/Patient.result.ts",
@@ -2912,6 +2991,7 @@
"schemas/variants/result/AiSettings.result.ts",
"schemas/variants/result/OfficeHours.result.ts",
"schemas/variants/result/OfficeContact.result.ts",
"schemas/variants/result/ProcedureTimeslot.result.ts",
"schemas/variants/result/index.ts",
"schemas/variants/index.ts"
],