@valentine-efagene/qshelter-common 2.0.100 → 2.0.102
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.
- package/dist/generated/client/internal/class.js +2 -2
- package/dist/generated/client/internal/prismaNamespace.d.ts +10 -0
- package/dist/generated/client/internal/prismaNamespace.js +10 -0
- package/dist/generated/client/internal/prismaNamespaceBrowser.d.ts +10 -0
- package/dist/generated/client/internal/prismaNamespaceBrowser.js +10 -0
- package/dist/generated/client/models/DomainEvent.d.ts +281 -2
- package/dist/generated/client/models/Settings.d.ts +211 -4
- package/dist/generated/client/models/Social.d.ts +147 -1
- package/dist/generated/client/models/Tenant.d.ts +3705 -639
- package/dist/generated/client/models/Transaction.d.ts +178 -14
- package/dist/generated/client/models/Wallet.d.ts +169 -1
- package/dist/generated/client/models/WorkflowBlocker.d.ts +299 -4
- package/dist/src/prisma/tenant.js +8 -0
- package/package.json +1 -1
- package/prisma/migrations/20260113122855_add_tenant_to_remaining_models/migration.sql +64 -0
- package/prisma/schema.prisma +25 -2
|
@@ -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,14 @@ const GLOBAL_MODELS = [
|
|
|
12
12
|
"tenant",
|
|
13
13
|
"user",
|
|
14
14
|
"tenantMembership",
|
|
15
|
+
// Auth/session related (linked to user, not tenant)
|
|
16
|
+
"refreshToken",
|
|
17
|
+
"passwordReset",
|
|
18
|
+
"userSuspension",
|
|
19
|
+
"oAuthState",
|
|
20
|
+
// User preferences/devices (linked to user, not tenant)
|
|
21
|
+
"emailPreference",
|
|
22
|
+
"deviceEndpoint",
|
|
15
23
|
];
|
|
16
24
|
/**
|
|
17
25
|
* Models that have OPTIONAL tenant scoping (nullable tenantId).
|
package/package.json
CHANGED
|
@@ -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;
|
package/prisma/schema.prisma
CHANGED
|
@@ -560,6 +560,12 @@ model Tenant {
|
|
|
560
560
|
propertyAmenities PropertyAmenity[]
|
|
561
561
|
eventHandlerExecutions EventHandlerExecution[]
|
|
562
562
|
amenities Amenity[]
|
|
563
|
+
socials Social[]
|
|
564
|
+
wallets Wallet[]
|
|
565
|
+
transactions Transaction[]
|
|
566
|
+
settings Settings[]
|
|
567
|
+
domainEvents DomainEvent[]
|
|
568
|
+
workflowBlockers WorkflowBlocker[]
|
|
563
569
|
|
|
564
570
|
@@index([subdomain])
|
|
565
571
|
@@map("tenants")
|
|
@@ -692,6 +698,8 @@ model DeviceEndpoint {
|
|
|
692
698
|
|
|
693
699
|
model Social {
|
|
694
700
|
id String @id @default(cuid())
|
|
701
|
+
tenantId String
|
|
702
|
+
tenant Tenant @relation(fields: [tenantId], references: [id], onDelete: Cascade)
|
|
695
703
|
userId String
|
|
696
704
|
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
697
705
|
provider String // google, facebook, twitter, etc
|
|
@@ -701,6 +709,7 @@ model Social {
|
|
|
701
709
|
|
|
702
710
|
@@unique([provider, socialId])
|
|
703
711
|
@@index([userId])
|
|
712
|
+
@@index([tenantId])
|
|
704
713
|
@@map("socials")
|
|
705
714
|
}
|
|
706
715
|
|
|
@@ -717,6 +726,8 @@ model OAuthState {
|
|
|
717
726
|
|
|
718
727
|
model Wallet {
|
|
719
728
|
id String @id @default(cuid())
|
|
729
|
+
tenantId String
|
|
730
|
+
tenant Tenant @relation(fields: [tenantId], references: [id], onDelete: Cascade)
|
|
720
731
|
balance Float @default(0)
|
|
721
732
|
currency String @default("USD")
|
|
722
733
|
user User?
|
|
@@ -724,11 +735,14 @@ model Wallet {
|
|
|
724
735
|
createdAt DateTime @default(now())
|
|
725
736
|
updatedAt DateTime @updatedAt
|
|
726
737
|
|
|
738
|
+
@@index([tenantId])
|
|
727
739
|
@@map("wallets")
|
|
728
740
|
}
|
|
729
741
|
|
|
730
742
|
model Transaction {
|
|
731
743
|
id String @id @default(cuid())
|
|
744
|
+
tenantId String
|
|
745
|
+
tenant Tenant @relation(fields: [tenantId], references: [id], onDelete: Cascade)
|
|
732
746
|
walletId String
|
|
733
747
|
wallet Wallet @relation(fields: [walletId], references: [id], onDelete: Cascade)
|
|
734
748
|
amount Float
|
|
@@ -740,18 +754,23 @@ model Transaction {
|
|
|
740
754
|
updatedAt DateTime @updatedAt
|
|
741
755
|
|
|
742
756
|
@@index([walletId])
|
|
757
|
+
@@index([tenantId])
|
|
743
758
|
@@map("transactions")
|
|
744
759
|
}
|
|
745
760
|
|
|
746
761
|
model Settings {
|
|
747
762
|
id String @id @default(cuid())
|
|
748
|
-
|
|
763
|
+
tenantId String
|
|
764
|
+
tenant Tenant @relation(fields: [tenantId], references: [id], onDelete: Cascade)
|
|
765
|
+
key String
|
|
749
766
|
value String @db.Text
|
|
750
767
|
category String?
|
|
751
768
|
createdAt DateTime @default(now())
|
|
752
769
|
updatedAt DateTime @updatedAt
|
|
753
770
|
|
|
771
|
+
@@unique([tenantId, key])
|
|
754
772
|
@@index([category])
|
|
773
|
+
@@index([tenantId])
|
|
755
774
|
@@map("settings")
|
|
756
775
|
}
|
|
757
776
|
|
|
@@ -2515,7 +2534,9 @@ model EventHandlerExecution {
|
|
|
2515
2534
|
// =============================================================================
|
|
2516
2535
|
|
|
2517
2536
|
model DomainEvent {
|
|
2518
|
-
id
|
|
2537
|
+
id String @id @default(cuid())
|
|
2538
|
+
tenantId String
|
|
2539
|
+
tenant Tenant @relation(fields: [tenantId], references: [id], onDelete: Cascade)
|
|
2519
2540
|
|
|
2520
2541
|
// Event identification
|
|
2521
2542
|
eventType String // MORTGAGE.CREATED, PHASE.ACTIVATED, PAYMENT.COMPLETED, etc
|
|
@@ -2544,6 +2565,7 @@ model DomainEvent {
|
|
|
2544
2565
|
createdAt DateTime @default(now())
|
|
2545
2566
|
updatedAt DateTime @updatedAt
|
|
2546
2567
|
|
|
2568
|
+
@@index([tenantId])
|
|
2547
2569
|
@@index([status, nextRetryAt])
|
|
2548
2570
|
@@index([eventType])
|
|
2549
2571
|
@@index([aggregateType, aggregateId])
|
|
@@ -2757,6 +2779,7 @@ enum BlockerUrgency {
|
|
|
2757
2779
|
model WorkflowBlocker {
|
|
2758
2780
|
id String @id @default(cuid())
|
|
2759
2781
|
tenantId String
|
|
2782
|
+
tenant Tenant @relation(fields: [tenantId], references: [id], onDelete: Cascade)
|
|
2760
2783
|
|
|
2761
2784
|
// Reference to the blocked entity
|
|
2762
2785
|
applicationId String
|