@valentine-efagene/qshelter-common 2.0.101 → 2.0.103

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/dist/generated/client/browser.d.ts +10 -0
  2. package/dist/generated/client/client.d.ts +10 -0
  3. package/dist/generated/client/commonInputTypes.d.ts +84 -84
  4. package/dist/generated/client/internal/class.d.ts +22 -0
  5. package/dist/generated/client/internal/class.js +2 -2
  6. package/dist/generated/client/internal/prismaNamespace.d.ts +192 -5
  7. package/dist/generated/client/internal/prismaNamespace.js +49 -0
  8. package/dist/generated/client/internal/prismaNamespaceBrowser.d.ts +53 -0
  9. package/dist/generated/client/internal/prismaNamespaceBrowser.js +49 -0
  10. package/dist/generated/client/models/DocumentationPhase.d.ts +231 -1
  11. package/dist/generated/client/models/DocumentationPlan.d.ts +1555 -0
  12. package/dist/generated/client/models/DocumentationPlan.js +1 -0
  13. package/dist/generated/client/models/DocumentationPlanStep.d.ts +1220 -0
  14. package/dist/generated/client/models/DocumentationPlanStep.js +1 -0
  15. package/dist/generated/client/models/DomainEvent.d.ts +281 -2
  16. package/dist/generated/client/models/PaymentMethodPhaseStep.d.ts +0 -3
  17. package/dist/generated/client/models/PropertyPaymentMethodPhase.d.ts +287 -1
  18. package/dist/generated/client/models/Settings.d.ts +211 -4
  19. package/dist/generated/client/models/Social.d.ts +147 -1
  20. package/dist/generated/client/models/Tenant.d.ts +4246 -639
  21. package/dist/generated/client/models/Transaction.d.ts +178 -14
  22. package/dist/generated/client/models/Wallet.d.ts +169 -1
  23. package/dist/generated/client/models/WorkflowBlocker.d.ts +299 -4
  24. package/dist/generated/client/models/index.d.ts +2 -0
  25. package/dist/generated/client/models/index.js +2 -0
  26. package/dist/generated/client/models.d.ts +2 -0
  27. package/dist/src/prisma/tenant.js +2 -8
  28. package/package.json +1 -1
  29. package/prisma/migrations/20260113122855_add_tenant_to_remaining_models/migration.sql +64 -0
  30. package/prisma/migrations/20260114034523_add_documentation_plan/migration.sql +52 -0
  31. package/prisma/schema.prisma +97 -10
@@ -321,6 +321,7 @@ export type WorkflowBlockerWhereInput = {
321
321
  metadata?: Prisma.JsonNullableFilter<"WorkflowBlocker">;
322
322
  createdAt?: Prisma.DateTimeFilter<"WorkflowBlocker"> | Date | string;
323
323
  updatedAt?: Prisma.DateTimeFilter<"WorkflowBlocker"> | Date | string;
324
+ tenant?: Prisma.XOR<Prisma.TenantScalarRelationFilter, Prisma.TenantWhereInput>;
324
325
  };
325
326
  export type WorkflowBlockerOrderByWithRelationInput = {
326
327
  id?: Prisma.SortOrder;
@@ -347,6 +348,7 @@ export type WorkflowBlockerOrderByWithRelationInput = {
347
348
  metadata?: Prisma.SortOrderInput | Prisma.SortOrder;
348
349
  createdAt?: Prisma.SortOrder;
349
350
  updatedAt?: Prisma.SortOrder;
351
+ tenant?: Prisma.TenantOrderByWithRelationInput;
350
352
  _relevance?: Prisma.WorkflowBlockerOrderByRelevanceInput;
351
353
  };
352
354
  export type WorkflowBlockerWhereUniqueInput = Prisma.AtLeast<{
@@ -377,6 +379,7 @@ export type WorkflowBlockerWhereUniqueInput = Prisma.AtLeast<{
377
379
  metadata?: Prisma.JsonNullableFilter<"WorkflowBlocker">;
378
380
  createdAt?: Prisma.DateTimeFilter<"WorkflowBlocker"> | Date | string;
379
381
  updatedAt?: Prisma.DateTimeFilter<"WorkflowBlocker"> | Date | string;
382
+ tenant?: Prisma.XOR<Prisma.TenantScalarRelationFilter, Prisma.TenantWhereInput>;
380
383
  }, "id">;
381
384
  export type WorkflowBlockerOrderByWithAggregationInput = {
382
385
  id?: Prisma.SortOrder;
@@ -440,7 +443,6 @@ export type WorkflowBlockerScalarWhereWithAggregatesInput = {
440
443
  };
441
444
  export type WorkflowBlockerCreateInput = {
442
445
  id?: string;
443
- tenantId: string;
444
446
  applicationId: string;
445
447
  phaseId?: string | null;
446
448
  stepId?: string | null;
@@ -463,6 +465,7 @@ export type WorkflowBlockerCreateInput = {
463
465
  metadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
464
466
  createdAt?: Date | string;
465
467
  updatedAt?: Date | string;
468
+ tenant: Prisma.TenantCreateNestedOneWithoutWorkflowBlockersInput;
466
469
  };
467
470
  export type WorkflowBlockerUncheckedCreateInput = {
468
471
  id?: string;
@@ -492,7 +495,6 @@ export type WorkflowBlockerUncheckedCreateInput = {
492
495
  };
493
496
  export type WorkflowBlockerUpdateInput = {
494
497
  id?: Prisma.StringFieldUpdateOperationsInput | string;
495
- tenantId?: Prisma.StringFieldUpdateOperationsInput | string;
496
498
  applicationId?: Prisma.StringFieldUpdateOperationsInput | string;
497
499
  phaseId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
498
500
  stepId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
@@ -515,6 +517,7 @@ export type WorkflowBlockerUpdateInput = {
515
517
  metadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
516
518
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
517
519
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
520
+ tenant?: Prisma.TenantUpdateOneRequiredWithoutWorkflowBlockersNestedInput;
518
521
  };
519
522
  export type WorkflowBlockerUncheckedUpdateInput = {
520
523
  id?: Prisma.StringFieldUpdateOperationsInput | string;
@@ -570,7 +573,6 @@ export type WorkflowBlockerCreateManyInput = {
570
573
  };
571
574
  export type WorkflowBlockerUpdateManyMutationInput = {
572
575
  id?: Prisma.StringFieldUpdateOperationsInput | string;
573
- tenantId?: Prisma.StringFieldUpdateOperationsInput | string;
574
576
  applicationId?: Prisma.StringFieldUpdateOperationsInput | string;
575
577
  phaseId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
576
578
  stepId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
@@ -620,6 +622,14 @@ export type WorkflowBlockerUncheckedUpdateManyInput = {
620
622
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
621
623
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
622
624
  };
625
+ export type WorkflowBlockerListRelationFilter = {
626
+ every?: Prisma.WorkflowBlockerWhereInput;
627
+ some?: Prisma.WorkflowBlockerWhereInput;
628
+ none?: Prisma.WorkflowBlockerWhereInput;
629
+ };
630
+ export type WorkflowBlockerOrderByRelationAggregateInput = {
631
+ _count?: Prisma.SortOrder;
632
+ };
623
633
  export type WorkflowBlockerOrderByRelevanceInput = {
624
634
  fields: Prisma.WorkflowBlockerOrderByRelevanceFieldEnum | Prisma.WorkflowBlockerOrderByRelevanceFieldEnum[];
625
635
  sort: Prisma.SortOrder;
@@ -709,6 +719,44 @@ export type WorkflowBlockerSumOrderByAggregateInput = {
709
719
  durationMs?: Prisma.SortOrder;
710
720
  reminderCount?: Prisma.SortOrder;
711
721
  };
722
+ export type WorkflowBlockerCreateNestedManyWithoutTenantInput = {
723
+ create?: Prisma.XOR<Prisma.WorkflowBlockerCreateWithoutTenantInput, Prisma.WorkflowBlockerUncheckedCreateWithoutTenantInput> | Prisma.WorkflowBlockerCreateWithoutTenantInput[] | Prisma.WorkflowBlockerUncheckedCreateWithoutTenantInput[];
724
+ connectOrCreate?: Prisma.WorkflowBlockerCreateOrConnectWithoutTenantInput | Prisma.WorkflowBlockerCreateOrConnectWithoutTenantInput[];
725
+ createMany?: Prisma.WorkflowBlockerCreateManyTenantInputEnvelope;
726
+ connect?: Prisma.WorkflowBlockerWhereUniqueInput | Prisma.WorkflowBlockerWhereUniqueInput[];
727
+ };
728
+ export type WorkflowBlockerUncheckedCreateNestedManyWithoutTenantInput = {
729
+ create?: Prisma.XOR<Prisma.WorkflowBlockerCreateWithoutTenantInput, Prisma.WorkflowBlockerUncheckedCreateWithoutTenantInput> | Prisma.WorkflowBlockerCreateWithoutTenantInput[] | Prisma.WorkflowBlockerUncheckedCreateWithoutTenantInput[];
730
+ connectOrCreate?: Prisma.WorkflowBlockerCreateOrConnectWithoutTenantInput | Prisma.WorkflowBlockerCreateOrConnectWithoutTenantInput[];
731
+ createMany?: Prisma.WorkflowBlockerCreateManyTenantInputEnvelope;
732
+ connect?: Prisma.WorkflowBlockerWhereUniqueInput | Prisma.WorkflowBlockerWhereUniqueInput[];
733
+ };
734
+ export type WorkflowBlockerUpdateManyWithoutTenantNestedInput = {
735
+ create?: Prisma.XOR<Prisma.WorkflowBlockerCreateWithoutTenantInput, Prisma.WorkflowBlockerUncheckedCreateWithoutTenantInput> | Prisma.WorkflowBlockerCreateWithoutTenantInput[] | Prisma.WorkflowBlockerUncheckedCreateWithoutTenantInput[];
736
+ connectOrCreate?: Prisma.WorkflowBlockerCreateOrConnectWithoutTenantInput | Prisma.WorkflowBlockerCreateOrConnectWithoutTenantInput[];
737
+ upsert?: Prisma.WorkflowBlockerUpsertWithWhereUniqueWithoutTenantInput | Prisma.WorkflowBlockerUpsertWithWhereUniqueWithoutTenantInput[];
738
+ createMany?: Prisma.WorkflowBlockerCreateManyTenantInputEnvelope;
739
+ set?: Prisma.WorkflowBlockerWhereUniqueInput | Prisma.WorkflowBlockerWhereUniqueInput[];
740
+ disconnect?: Prisma.WorkflowBlockerWhereUniqueInput | Prisma.WorkflowBlockerWhereUniqueInput[];
741
+ delete?: Prisma.WorkflowBlockerWhereUniqueInput | Prisma.WorkflowBlockerWhereUniqueInput[];
742
+ connect?: Prisma.WorkflowBlockerWhereUniqueInput | Prisma.WorkflowBlockerWhereUniqueInput[];
743
+ update?: Prisma.WorkflowBlockerUpdateWithWhereUniqueWithoutTenantInput | Prisma.WorkflowBlockerUpdateWithWhereUniqueWithoutTenantInput[];
744
+ updateMany?: Prisma.WorkflowBlockerUpdateManyWithWhereWithoutTenantInput | Prisma.WorkflowBlockerUpdateManyWithWhereWithoutTenantInput[];
745
+ deleteMany?: Prisma.WorkflowBlockerScalarWhereInput | Prisma.WorkflowBlockerScalarWhereInput[];
746
+ };
747
+ export type WorkflowBlockerUncheckedUpdateManyWithoutTenantNestedInput = {
748
+ create?: Prisma.XOR<Prisma.WorkflowBlockerCreateWithoutTenantInput, Prisma.WorkflowBlockerUncheckedCreateWithoutTenantInput> | Prisma.WorkflowBlockerCreateWithoutTenantInput[] | Prisma.WorkflowBlockerUncheckedCreateWithoutTenantInput[];
749
+ connectOrCreate?: Prisma.WorkflowBlockerCreateOrConnectWithoutTenantInput | Prisma.WorkflowBlockerCreateOrConnectWithoutTenantInput[];
750
+ upsert?: Prisma.WorkflowBlockerUpsertWithWhereUniqueWithoutTenantInput | Prisma.WorkflowBlockerUpsertWithWhereUniqueWithoutTenantInput[];
751
+ createMany?: Prisma.WorkflowBlockerCreateManyTenantInputEnvelope;
752
+ set?: Prisma.WorkflowBlockerWhereUniqueInput | Prisma.WorkflowBlockerWhereUniqueInput[];
753
+ disconnect?: Prisma.WorkflowBlockerWhereUniqueInput | Prisma.WorkflowBlockerWhereUniqueInput[];
754
+ delete?: Prisma.WorkflowBlockerWhereUniqueInput | Prisma.WorkflowBlockerWhereUniqueInput[];
755
+ connect?: Prisma.WorkflowBlockerWhereUniqueInput | Prisma.WorkflowBlockerWhereUniqueInput[];
756
+ update?: Prisma.WorkflowBlockerUpdateWithWhereUniqueWithoutTenantInput | Prisma.WorkflowBlockerUpdateWithWhereUniqueWithoutTenantInput[];
757
+ updateMany?: Prisma.WorkflowBlockerUpdateManyWithWhereWithoutTenantInput | Prisma.WorkflowBlockerUpdateManyWithWhereWithoutTenantInput[];
758
+ deleteMany?: Prisma.WorkflowBlockerScalarWhereInput | Prisma.WorkflowBlockerScalarWhereInput[];
759
+ };
712
760
  export type EnumBlockerActorFieldUpdateOperationsInput = {
713
761
  set?: $Enums.BlockerActor;
714
762
  };
@@ -718,6 +766,206 @@ export type EnumBlockerCategoryFieldUpdateOperationsInput = {
718
766
  export type EnumBlockerUrgencyFieldUpdateOperationsInput = {
719
767
  set?: $Enums.BlockerUrgency;
720
768
  };
769
+ export type WorkflowBlockerCreateWithoutTenantInput = {
770
+ id?: string;
771
+ applicationId: string;
772
+ phaseId?: string | null;
773
+ stepId?: string | null;
774
+ blockerActor: $Enums.BlockerActor;
775
+ blockerCategory: $Enums.BlockerCategory;
776
+ urgency?: $Enums.BlockerUrgency;
777
+ actionRequired: string;
778
+ context?: string | null;
779
+ expectedByDate?: Date | string | null;
780
+ isOverdue?: boolean;
781
+ overdueAt?: Date | string | null;
782
+ startedAt?: Date | string;
783
+ resolvedAt?: Date | string | null;
784
+ durationMs?: number | null;
785
+ resolvedByActor?: string | null;
786
+ resolutionTrigger?: string | null;
787
+ reminderCount?: number;
788
+ lastReminderAt?: Date | string | null;
789
+ nextReminderAt?: Date | string | null;
790
+ metadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
791
+ createdAt?: Date | string;
792
+ updatedAt?: Date | string;
793
+ };
794
+ export type WorkflowBlockerUncheckedCreateWithoutTenantInput = {
795
+ id?: string;
796
+ applicationId: string;
797
+ phaseId?: string | null;
798
+ stepId?: string | null;
799
+ blockerActor: $Enums.BlockerActor;
800
+ blockerCategory: $Enums.BlockerCategory;
801
+ urgency?: $Enums.BlockerUrgency;
802
+ actionRequired: string;
803
+ context?: string | null;
804
+ expectedByDate?: Date | string | null;
805
+ isOverdue?: boolean;
806
+ overdueAt?: Date | string | null;
807
+ startedAt?: Date | string;
808
+ resolvedAt?: Date | string | null;
809
+ durationMs?: number | null;
810
+ resolvedByActor?: string | null;
811
+ resolutionTrigger?: string | null;
812
+ reminderCount?: number;
813
+ lastReminderAt?: Date | string | null;
814
+ nextReminderAt?: Date | string | null;
815
+ metadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
816
+ createdAt?: Date | string;
817
+ updatedAt?: Date | string;
818
+ };
819
+ export type WorkflowBlockerCreateOrConnectWithoutTenantInput = {
820
+ where: Prisma.WorkflowBlockerWhereUniqueInput;
821
+ create: Prisma.XOR<Prisma.WorkflowBlockerCreateWithoutTenantInput, Prisma.WorkflowBlockerUncheckedCreateWithoutTenantInput>;
822
+ };
823
+ export type WorkflowBlockerCreateManyTenantInputEnvelope = {
824
+ data: Prisma.WorkflowBlockerCreateManyTenantInput | Prisma.WorkflowBlockerCreateManyTenantInput[];
825
+ skipDuplicates?: boolean;
826
+ };
827
+ export type WorkflowBlockerUpsertWithWhereUniqueWithoutTenantInput = {
828
+ where: Prisma.WorkflowBlockerWhereUniqueInput;
829
+ update: Prisma.XOR<Prisma.WorkflowBlockerUpdateWithoutTenantInput, Prisma.WorkflowBlockerUncheckedUpdateWithoutTenantInput>;
830
+ create: Prisma.XOR<Prisma.WorkflowBlockerCreateWithoutTenantInput, Prisma.WorkflowBlockerUncheckedCreateWithoutTenantInput>;
831
+ };
832
+ export type WorkflowBlockerUpdateWithWhereUniqueWithoutTenantInput = {
833
+ where: Prisma.WorkflowBlockerWhereUniqueInput;
834
+ data: Prisma.XOR<Prisma.WorkflowBlockerUpdateWithoutTenantInput, Prisma.WorkflowBlockerUncheckedUpdateWithoutTenantInput>;
835
+ };
836
+ export type WorkflowBlockerUpdateManyWithWhereWithoutTenantInput = {
837
+ where: Prisma.WorkflowBlockerScalarWhereInput;
838
+ data: Prisma.XOR<Prisma.WorkflowBlockerUpdateManyMutationInput, Prisma.WorkflowBlockerUncheckedUpdateManyWithoutTenantInput>;
839
+ };
840
+ export type WorkflowBlockerScalarWhereInput = {
841
+ AND?: Prisma.WorkflowBlockerScalarWhereInput | Prisma.WorkflowBlockerScalarWhereInput[];
842
+ OR?: Prisma.WorkflowBlockerScalarWhereInput[];
843
+ NOT?: Prisma.WorkflowBlockerScalarWhereInput | Prisma.WorkflowBlockerScalarWhereInput[];
844
+ id?: Prisma.StringFilter<"WorkflowBlocker"> | string;
845
+ tenantId?: Prisma.StringFilter<"WorkflowBlocker"> | string;
846
+ applicationId?: Prisma.StringFilter<"WorkflowBlocker"> | string;
847
+ phaseId?: Prisma.StringNullableFilter<"WorkflowBlocker"> | string | null;
848
+ stepId?: Prisma.StringNullableFilter<"WorkflowBlocker"> | string | null;
849
+ blockerActor?: Prisma.EnumBlockerActorFilter<"WorkflowBlocker"> | $Enums.BlockerActor;
850
+ blockerCategory?: Prisma.EnumBlockerCategoryFilter<"WorkflowBlocker"> | $Enums.BlockerCategory;
851
+ urgency?: Prisma.EnumBlockerUrgencyFilter<"WorkflowBlocker"> | $Enums.BlockerUrgency;
852
+ actionRequired?: Prisma.StringFilter<"WorkflowBlocker"> | string;
853
+ context?: Prisma.StringNullableFilter<"WorkflowBlocker"> | string | null;
854
+ expectedByDate?: Prisma.DateTimeNullableFilter<"WorkflowBlocker"> | Date | string | null;
855
+ isOverdue?: Prisma.BoolFilter<"WorkflowBlocker"> | boolean;
856
+ overdueAt?: Prisma.DateTimeNullableFilter<"WorkflowBlocker"> | Date | string | null;
857
+ startedAt?: Prisma.DateTimeFilter<"WorkflowBlocker"> | Date | string;
858
+ resolvedAt?: Prisma.DateTimeNullableFilter<"WorkflowBlocker"> | Date | string | null;
859
+ durationMs?: Prisma.IntNullableFilter<"WorkflowBlocker"> | number | null;
860
+ resolvedByActor?: Prisma.StringNullableFilter<"WorkflowBlocker"> | string | null;
861
+ resolutionTrigger?: Prisma.StringNullableFilter<"WorkflowBlocker"> | string | null;
862
+ reminderCount?: Prisma.IntFilter<"WorkflowBlocker"> | number;
863
+ lastReminderAt?: Prisma.DateTimeNullableFilter<"WorkflowBlocker"> | Date | string | null;
864
+ nextReminderAt?: Prisma.DateTimeNullableFilter<"WorkflowBlocker"> | Date | string | null;
865
+ metadata?: Prisma.JsonNullableFilter<"WorkflowBlocker">;
866
+ createdAt?: Prisma.DateTimeFilter<"WorkflowBlocker"> | Date | string;
867
+ updatedAt?: Prisma.DateTimeFilter<"WorkflowBlocker"> | Date | string;
868
+ };
869
+ export type WorkflowBlockerCreateManyTenantInput = {
870
+ id?: string;
871
+ applicationId: string;
872
+ phaseId?: string | null;
873
+ stepId?: string | null;
874
+ blockerActor: $Enums.BlockerActor;
875
+ blockerCategory: $Enums.BlockerCategory;
876
+ urgency?: $Enums.BlockerUrgency;
877
+ actionRequired: string;
878
+ context?: string | null;
879
+ expectedByDate?: Date | string | null;
880
+ isOverdue?: boolean;
881
+ overdueAt?: Date | string | null;
882
+ startedAt?: Date | string;
883
+ resolvedAt?: Date | string | null;
884
+ durationMs?: number | null;
885
+ resolvedByActor?: string | null;
886
+ resolutionTrigger?: string | null;
887
+ reminderCount?: number;
888
+ lastReminderAt?: Date | string | null;
889
+ nextReminderAt?: Date | string | null;
890
+ metadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
891
+ createdAt?: Date | string;
892
+ updatedAt?: Date | string;
893
+ };
894
+ export type WorkflowBlockerUpdateWithoutTenantInput = {
895
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
896
+ applicationId?: Prisma.StringFieldUpdateOperationsInput | string;
897
+ phaseId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
898
+ stepId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
899
+ blockerActor?: Prisma.EnumBlockerActorFieldUpdateOperationsInput | $Enums.BlockerActor;
900
+ blockerCategory?: Prisma.EnumBlockerCategoryFieldUpdateOperationsInput | $Enums.BlockerCategory;
901
+ urgency?: Prisma.EnumBlockerUrgencyFieldUpdateOperationsInput | $Enums.BlockerUrgency;
902
+ actionRequired?: Prisma.StringFieldUpdateOperationsInput | string;
903
+ context?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
904
+ expectedByDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
905
+ isOverdue?: Prisma.BoolFieldUpdateOperationsInput | boolean;
906
+ overdueAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
907
+ startedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
908
+ resolvedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
909
+ durationMs?: Prisma.NullableIntFieldUpdateOperationsInput | number | null;
910
+ resolvedByActor?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
911
+ resolutionTrigger?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
912
+ reminderCount?: Prisma.IntFieldUpdateOperationsInput | number;
913
+ lastReminderAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
914
+ nextReminderAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
915
+ metadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
916
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
917
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
918
+ };
919
+ export type WorkflowBlockerUncheckedUpdateWithoutTenantInput = {
920
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
921
+ applicationId?: Prisma.StringFieldUpdateOperationsInput | string;
922
+ phaseId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
923
+ stepId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
924
+ blockerActor?: Prisma.EnumBlockerActorFieldUpdateOperationsInput | $Enums.BlockerActor;
925
+ blockerCategory?: Prisma.EnumBlockerCategoryFieldUpdateOperationsInput | $Enums.BlockerCategory;
926
+ urgency?: Prisma.EnumBlockerUrgencyFieldUpdateOperationsInput | $Enums.BlockerUrgency;
927
+ actionRequired?: Prisma.StringFieldUpdateOperationsInput | string;
928
+ context?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
929
+ expectedByDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
930
+ isOverdue?: Prisma.BoolFieldUpdateOperationsInput | boolean;
931
+ overdueAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
932
+ startedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
933
+ resolvedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
934
+ durationMs?: Prisma.NullableIntFieldUpdateOperationsInput | number | null;
935
+ resolvedByActor?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
936
+ resolutionTrigger?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
937
+ reminderCount?: Prisma.IntFieldUpdateOperationsInput | number;
938
+ lastReminderAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
939
+ nextReminderAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
940
+ metadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
941
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
942
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
943
+ };
944
+ export type WorkflowBlockerUncheckedUpdateManyWithoutTenantInput = {
945
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
946
+ applicationId?: Prisma.StringFieldUpdateOperationsInput | string;
947
+ phaseId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
948
+ stepId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
949
+ blockerActor?: Prisma.EnumBlockerActorFieldUpdateOperationsInput | $Enums.BlockerActor;
950
+ blockerCategory?: Prisma.EnumBlockerCategoryFieldUpdateOperationsInput | $Enums.BlockerCategory;
951
+ urgency?: Prisma.EnumBlockerUrgencyFieldUpdateOperationsInput | $Enums.BlockerUrgency;
952
+ actionRequired?: Prisma.StringFieldUpdateOperationsInput | string;
953
+ context?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
954
+ expectedByDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
955
+ isOverdue?: Prisma.BoolFieldUpdateOperationsInput | boolean;
956
+ overdueAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
957
+ startedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
958
+ resolvedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
959
+ durationMs?: Prisma.NullableIntFieldUpdateOperationsInput | number | null;
960
+ resolvedByActor?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
961
+ resolutionTrigger?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
962
+ reminderCount?: Prisma.IntFieldUpdateOperationsInput | number;
963
+ lastReminderAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
964
+ nextReminderAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
965
+ metadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
966
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
967
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
968
+ };
721
969
  export type WorkflowBlockerSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
722
970
  id?: boolean;
723
971
  tenantId?: boolean;
@@ -743,6 +991,7 @@ export type WorkflowBlockerSelect<ExtArgs extends runtime.Types.Extensions.Inter
743
991
  metadata?: boolean;
744
992
  createdAt?: boolean;
745
993
  updatedAt?: boolean;
994
+ tenant?: boolean | Prisma.TenantDefaultArgs<ExtArgs>;
746
995
  }, ExtArgs["result"]["workflowBlocker"]>;
747
996
  export type WorkflowBlockerSelectScalar = {
748
997
  id?: boolean;
@@ -771,9 +1020,14 @@ export type WorkflowBlockerSelectScalar = {
771
1020
  updatedAt?: boolean;
772
1021
  };
773
1022
  export type WorkflowBlockerOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "tenantId" | "applicationId" | "phaseId" | "stepId" | "blockerActor" | "blockerCategory" | "urgency" | "actionRequired" | "context" | "expectedByDate" | "isOverdue" | "overdueAt" | "startedAt" | "resolvedAt" | "durationMs" | "resolvedByActor" | "resolutionTrigger" | "reminderCount" | "lastReminderAt" | "nextReminderAt" | "metadata" | "createdAt" | "updatedAt", ExtArgs["result"]["workflowBlocker"]>;
1023
+ export type WorkflowBlockerInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1024
+ tenant?: boolean | Prisma.TenantDefaultArgs<ExtArgs>;
1025
+ };
774
1026
  export type $WorkflowBlockerPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
775
1027
  name: "WorkflowBlocker";
776
- objects: {};
1028
+ objects: {
1029
+ tenant: Prisma.$TenantPayload<ExtArgs>;
1030
+ };
777
1031
  scalars: runtime.Types.Extensions.GetPayloadResult<{
778
1032
  id: string;
779
1033
  tenantId: string;
@@ -1076,6 +1330,7 @@ export interface WorkflowBlockerDelegate<ExtArgs extends runtime.Types.Extension
1076
1330
  */
1077
1331
  export interface Prisma__WorkflowBlockerClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
1078
1332
  readonly [Symbol.toStringTag]: "PrismaPromise";
1333
+ tenant<T extends Prisma.TenantDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.TenantDefaultArgs<ExtArgs>>): Prisma.Prisma__TenantClient<runtime.Types.Result.GetResult<Prisma.$TenantPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>;
1079
1334
  /**
1080
1335
  * Attaches callbacks for the resolution and/or rejection of the Promise.
1081
1336
  * @param onfulfilled The callback to execute when the Promise is resolved.
@@ -1138,6 +1393,10 @@ export type WorkflowBlockerFindUniqueArgs<ExtArgs extends runtime.Types.Extensio
1138
1393
  * Omit specific fields from the WorkflowBlocker
1139
1394
  */
1140
1395
  omit?: Prisma.WorkflowBlockerOmit<ExtArgs> | null;
1396
+ /**
1397
+ * Choose, which related nodes to fetch as well
1398
+ */
1399
+ include?: Prisma.WorkflowBlockerInclude<ExtArgs> | null;
1141
1400
  /**
1142
1401
  * Filter, which WorkflowBlocker to fetch.
1143
1402
  */
@@ -1155,6 +1414,10 @@ export type WorkflowBlockerFindUniqueOrThrowArgs<ExtArgs extends runtime.Types.E
1155
1414
  * Omit specific fields from the WorkflowBlocker
1156
1415
  */
1157
1416
  omit?: Prisma.WorkflowBlockerOmit<ExtArgs> | null;
1417
+ /**
1418
+ * Choose, which related nodes to fetch as well
1419
+ */
1420
+ include?: Prisma.WorkflowBlockerInclude<ExtArgs> | null;
1158
1421
  /**
1159
1422
  * Filter, which WorkflowBlocker to fetch.
1160
1423
  */
@@ -1172,6 +1435,10 @@ export type WorkflowBlockerFindFirstArgs<ExtArgs extends runtime.Types.Extension
1172
1435
  * Omit specific fields from the WorkflowBlocker
1173
1436
  */
1174
1437
  omit?: Prisma.WorkflowBlockerOmit<ExtArgs> | null;
1438
+ /**
1439
+ * Choose, which related nodes to fetch as well
1440
+ */
1441
+ include?: Prisma.WorkflowBlockerInclude<ExtArgs> | null;
1175
1442
  /**
1176
1443
  * Filter, which WorkflowBlocker to fetch.
1177
1444
  */
@@ -1219,6 +1486,10 @@ export type WorkflowBlockerFindFirstOrThrowArgs<ExtArgs extends runtime.Types.Ex
1219
1486
  * Omit specific fields from the WorkflowBlocker
1220
1487
  */
1221
1488
  omit?: Prisma.WorkflowBlockerOmit<ExtArgs> | null;
1489
+ /**
1490
+ * Choose, which related nodes to fetch as well
1491
+ */
1492
+ include?: Prisma.WorkflowBlockerInclude<ExtArgs> | null;
1222
1493
  /**
1223
1494
  * Filter, which WorkflowBlocker to fetch.
1224
1495
  */
@@ -1266,6 +1537,10 @@ export type WorkflowBlockerFindManyArgs<ExtArgs extends runtime.Types.Extensions
1266
1537
  * Omit specific fields from the WorkflowBlocker
1267
1538
  */
1268
1539
  omit?: Prisma.WorkflowBlockerOmit<ExtArgs> | null;
1540
+ /**
1541
+ * Choose, which related nodes to fetch as well
1542
+ */
1543
+ include?: Prisma.WorkflowBlockerInclude<ExtArgs> | null;
1269
1544
  /**
1270
1545
  * Filter, which WorkflowBlockers to fetch.
1271
1546
  */
@@ -1308,6 +1583,10 @@ export type WorkflowBlockerCreateArgs<ExtArgs extends runtime.Types.Extensions.I
1308
1583
  * Omit specific fields from the WorkflowBlocker
1309
1584
  */
1310
1585
  omit?: Prisma.WorkflowBlockerOmit<ExtArgs> | null;
1586
+ /**
1587
+ * Choose, which related nodes to fetch as well
1588
+ */
1589
+ include?: Prisma.WorkflowBlockerInclude<ExtArgs> | null;
1311
1590
  /**
1312
1591
  * The data needed to create a WorkflowBlocker.
1313
1592
  */
@@ -1335,6 +1614,10 @@ export type WorkflowBlockerUpdateArgs<ExtArgs extends runtime.Types.Extensions.I
1335
1614
  * Omit specific fields from the WorkflowBlocker
1336
1615
  */
1337
1616
  omit?: Prisma.WorkflowBlockerOmit<ExtArgs> | null;
1617
+ /**
1618
+ * Choose, which related nodes to fetch as well
1619
+ */
1620
+ include?: Prisma.WorkflowBlockerInclude<ExtArgs> | null;
1338
1621
  /**
1339
1622
  * The data needed to update a WorkflowBlocker.
1340
1623
  */
@@ -1373,6 +1656,10 @@ export type WorkflowBlockerUpsertArgs<ExtArgs extends runtime.Types.Extensions.I
1373
1656
  * Omit specific fields from the WorkflowBlocker
1374
1657
  */
1375
1658
  omit?: Prisma.WorkflowBlockerOmit<ExtArgs> | null;
1659
+ /**
1660
+ * Choose, which related nodes to fetch as well
1661
+ */
1662
+ include?: Prisma.WorkflowBlockerInclude<ExtArgs> | null;
1376
1663
  /**
1377
1664
  * The filter to search for the WorkflowBlocker to update in case it exists.
1378
1665
  */
@@ -1398,6 +1685,10 @@ export type WorkflowBlockerDeleteArgs<ExtArgs extends runtime.Types.Extensions.I
1398
1685
  * Omit specific fields from the WorkflowBlocker
1399
1686
  */
1400
1687
  omit?: Prisma.WorkflowBlockerOmit<ExtArgs> | null;
1688
+ /**
1689
+ * Choose, which related nodes to fetch as well
1690
+ */
1691
+ include?: Prisma.WorkflowBlockerInclude<ExtArgs> | null;
1401
1692
  /**
1402
1693
  * Filter which WorkflowBlocker to delete.
1403
1694
  */
@@ -1428,5 +1719,9 @@ export type WorkflowBlockerDefaultArgs<ExtArgs extends runtime.Types.Extensions.
1428
1719
  * Omit specific fields from the WorkflowBlocker
1429
1720
  */
1430
1721
  omit?: Prisma.WorkflowBlockerOmit<ExtArgs> | null;
1722
+ /**
1723
+ * Choose, which related nodes to fetch as well
1724
+ */
1725
+ include?: Prisma.WorkflowBlockerInclude<ExtArgs> | null;
1431
1726
  };
1432
1727
  export {};
@@ -12,6 +12,8 @@ export * from './DeviceEndpoint';
12
12
  export * from './DocumentRequirementRule';
13
13
  export * from './DocumentTemplate';
14
14
  export * from './DocumentationPhase';
15
+ export * from './DocumentationPlan';
16
+ export * from './DocumentationPlanStep';
15
17
  export * from './DocumentationStep';
16
18
  export * from './DocumentationStepApproval';
17
19
  export * from './DocumentationStepDocument';
@@ -12,6 +12,8 @@ export * from './DeviceEndpoint';
12
12
  export * from './DocumentRequirementRule';
13
13
  export * from './DocumentTemplate';
14
14
  export * from './DocumentationPhase';
15
+ export * from './DocumentationPlan';
16
+ export * from './DocumentationPlanStep';
15
17
  export * from './DocumentationStep';
16
18
  export * from './DocumentationStepApproval';
17
19
  export * from './DocumentationStepDocument';
@@ -25,6 +25,8 @@ export type * from './models/PropertyVariantAmenity.js';
25
25
  export type * from './models/PropertyVariantMedia.js';
26
26
  export type * from './models/PropertyUnit.js';
27
27
  export type * from './models/PropertyAmenity.js';
28
+ export type * from './models/DocumentationPlan.js';
29
+ export type * from './models/DocumentationPlanStep.js';
28
30
  export type * from './models/PaymentPlan.js';
29
31
  export type * from './models/PropertyPaymentMethod.js';
30
32
  export type * from './models/PropertyPaymentMethodLink.js';
@@ -20,14 +20,6 @@ const GLOBAL_MODELS = [
20
20
  // User preferences/devices (linked to user, not tenant)
21
21
  "emailPreference",
22
22
  "deviceEndpoint",
23
- "social",
24
- // Financial (linked to user/wallet, not tenant)
25
- "wallet",
26
- "transaction",
27
- // System settings (global)
28
- "settings",
29
- // Event bus (cross-tenant infrastructure)
30
- "domainEvent",
31
23
  ];
32
24
  /**
33
25
  * Models that have OPTIONAL tenant scoping (nullable tenantId).
@@ -36,6 +28,8 @@ const GLOBAL_MODELS = [
36
28
  */
37
29
  const OPTIONAL_TENANT_MODELS = [
38
30
  "paymentPlan",
31
+ // DocumentationPlan can be global template (tenantId = null) or tenant-specific
32
+ "documentationPlan",
39
33
  // Role can be global template (tenantId = null) or tenant-specific
40
34
  "role",
41
35
  // Permission can be global template or tenant-specific
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@valentine-efagene/qshelter-common",
3
- "version": "2.0.101",
3
+ "version": "2.0.103",
4
4
  "description": "Shared database schemas and utilities for QShelter services",
5
5
  "main": "dist/src/index.js",
6
6
  "types": "dist/src/index.d.ts",
@@ -0,0 +1,64 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - A unique constraint covering the columns `[tenantId,key]` on the table `settings` will be added. If there are existing duplicate values, this will fail.
5
+ - Added the required column `tenantId` to the `domain_events` table without a default value. This is not possible if the table is not empty.
6
+ - Added the required column `tenantId` to the `settings` table without a default value. This is not possible if the table is not empty.
7
+ - Added the required column `tenantId` to the `socials` table without a default value. This is not possible if the table is not empty.
8
+ - Added the required column `tenantId` to the `transactions` table without a default value. This is not possible if the table is not empty.
9
+ - Added the required column `tenantId` to the `wallets` table without a default value. This is not possible if the table is not empty.
10
+
11
+ */
12
+ -- DropIndex
13
+ DROP INDEX `settings_key_key` ON `settings`;
14
+
15
+ -- AlterTable
16
+ ALTER TABLE `domain_events` ADD COLUMN `tenantId` VARCHAR(191) NOT NULL;
17
+
18
+ -- AlterTable
19
+ ALTER TABLE `settings` ADD COLUMN `tenantId` VARCHAR(191) NOT NULL;
20
+
21
+ -- AlterTable
22
+ ALTER TABLE `socials` ADD COLUMN `tenantId` VARCHAR(191) NOT NULL;
23
+
24
+ -- AlterTable
25
+ ALTER TABLE `transactions` ADD COLUMN `tenantId` VARCHAR(191) NOT NULL;
26
+
27
+ -- AlterTable
28
+ ALTER TABLE `wallets` ADD COLUMN `tenantId` VARCHAR(191) NOT NULL;
29
+
30
+ -- CreateIndex
31
+ CREATE INDEX `domain_events_tenantId_idx` ON `domain_events`(`tenantId`);
32
+
33
+ -- CreateIndex
34
+ CREATE INDEX `settings_tenantId_idx` ON `settings`(`tenantId`);
35
+
36
+ -- CreateIndex
37
+ CREATE UNIQUE INDEX `settings_tenantId_key_key` ON `settings`(`tenantId`, `key`);
38
+
39
+ -- CreateIndex
40
+ CREATE INDEX `socials_tenantId_idx` ON `socials`(`tenantId`);
41
+
42
+ -- CreateIndex
43
+ CREATE INDEX `transactions_tenantId_idx` ON `transactions`(`tenantId`);
44
+
45
+ -- CreateIndex
46
+ CREATE INDEX `wallets_tenantId_idx` ON `wallets`(`tenantId`);
47
+
48
+ -- AddForeignKey
49
+ ALTER TABLE `socials` ADD CONSTRAINT `socials_tenantId_fkey` FOREIGN KEY (`tenantId`) REFERENCES `tenants`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
50
+
51
+ -- AddForeignKey
52
+ ALTER TABLE `wallets` ADD CONSTRAINT `wallets_tenantId_fkey` FOREIGN KEY (`tenantId`) REFERENCES `tenants`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
53
+
54
+ -- AddForeignKey
55
+ ALTER TABLE `transactions` ADD CONSTRAINT `transactions_tenantId_fkey` FOREIGN KEY (`tenantId`) REFERENCES `tenants`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
56
+
57
+ -- AddForeignKey
58
+ ALTER TABLE `settings` ADD CONSTRAINT `settings_tenantId_fkey` FOREIGN KEY (`tenantId`) REFERENCES `tenants`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
59
+
60
+ -- AddForeignKey
61
+ ALTER TABLE `domain_events` ADD CONSTRAINT `domain_events_tenantId_fkey` FOREIGN KEY (`tenantId`) REFERENCES `tenants`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
62
+
63
+ -- AddForeignKey
64
+ ALTER TABLE `workflow_blockers` ADD CONSTRAINT `workflow_blockers_tenantId_fkey` FOREIGN KEY (`tenantId`) REFERENCES `tenants`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
@@ -0,0 +1,52 @@
1
+ -- AlterTable
2
+ ALTER TABLE `documentation_phases` ADD COLUMN `documentationPlanId` VARCHAR(191) NULL;
3
+
4
+ -- AlterTable
5
+ ALTER TABLE `property_payment_method_phases` ADD COLUMN `documentationPlanId` VARCHAR(191) NULL;
6
+
7
+ -- CreateTable
8
+ CREATE TABLE `documentation_plans` (
9
+ `id` VARCHAR(191) NOT NULL,
10
+ `tenantId` VARCHAR(191) NULL,
11
+ `name` VARCHAR(191) NOT NULL,
12
+ `description` TEXT NULL,
13
+ `isActive` BOOLEAN NOT NULL DEFAULT true,
14
+ `requiredDocumentTypes` JSON NULL,
15
+ `createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
16
+ `updatedAt` DATETIME(3) NOT NULL,
17
+
18
+ INDEX `documentation_plans_tenantId_idx`(`tenantId`),
19
+ UNIQUE INDEX `documentation_plans_tenantId_name_key`(`tenantId`, `name`),
20
+ PRIMARY KEY (`id`)
21
+ ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
22
+
23
+ -- CreateTable
24
+ CREATE TABLE `documentation_plan_steps` (
25
+ `id` VARCHAR(191) NOT NULL,
26
+ `planId` VARCHAR(191) NOT NULL,
27
+ `name` VARCHAR(191) NOT NULL,
28
+ `stepType` ENUM('UPLOAD', 'REVIEW', 'SIGNATURE', 'APPROVAL', 'EXTERNAL_CHECK', 'WAIT', 'GENERATE_DOCUMENT', 'PRE_APPROVAL', 'UNDERWRITING') NOT NULL,
29
+ `order` INTEGER NOT NULL,
30
+ `documentType` VARCHAR(191) NULL,
31
+ `metadata` JSON NULL,
32
+ `createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
33
+ `updatedAt` DATETIME(3) NOT NULL,
34
+
35
+ INDEX `documentation_plan_steps_planId_idx`(`planId`),
36
+ PRIMARY KEY (`id`)
37
+ ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
38
+
39
+ -- CreateIndex
40
+ CREATE INDEX `property_payment_method_phases_documentationPlanId_idx` ON `property_payment_method_phases`(`documentationPlanId`);
41
+
42
+ -- AddForeignKey
43
+ ALTER TABLE `documentation_plans` ADD CONSTRAINT `documentation_plans_tenantId_fkey` FOREIGN KEY (`tenantId`) REFERENCES `tenants`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
44
+
45
+ -- AddForeignKey
46
+ ALTER TABLE `documentation_plan_steps` ADD CONSTRAINT `documentation_plan_steps_planId_fkey` FOREIGN KEY (`planId`) REFERENCES `documentation_plans`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
47
+
48
+ -- AddForeignKey
49
+ ALTER TABLE `property_payment_method_phases` ADD CONSTRAINT `property_payment_method_phases_documentationPlanId_fkey` FOREIGN KEY (`documentationPlanId`) REFERENCES `documentation_plans`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;
50
+
51
+ -- AddForeignKey
52
+ ALTER TABLE `documentation_phases` ADD CONSTRAINT `documentation_phases_documentationPlanId_fkey` FOREIGN KEY (`documentationPlanId`) REFERENCES `documentation_plans`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;