@valentine-efagene/qshelter-common 2.0.145 → 2.0.147
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/enums.d.ts +2 -0
- package/dist/generated/client/enums.js +4 -2
- package/dist/generated/client/internal/class.js +2 -2
- package/dist/generated/client/internal/prismaNamespace.d.ts +3 -0
- package/dist/generated/client/internal/prismaNamespace.js +3 -0
- package/dist/generated/client/internal/prismaNamespaceBrowser.d.ts +3 -0
- package/dist/generated/client/internal/prismaNamespaceBrowser.js +3 -0
- package/dist/generated/client/models/PaymentInstallment.d.ts +50 -1
- package/dist/generated/client/models/PaymentMethodPhaseStep.d.ts +6 -1
- package/dist/generated/client/models/PaymentPhase.d.ts +54 -1
- package/dist/generated/client/models/PropertyPaymentMethodPhase.d.ts +6 -1
- package/dist/generated/client/models/PropertyUnit.d.ts +54 -1
- package/package.json +1 -1
- package/prisma/migrations/20260121155057_add_event_execution_and_bank_docs/migration.sql +198 -0
- package/prisma/migrations/20260121161937_add_phase_step_order_unique_constraints/migration.sql +12 -0
- package/prisma/migrations/20260121163910_add_optimistic_locking/migration.sql +14 -0
- package/prisma/schema.prisma +14 -1
|
@@ -16,11 +16,13 @@ export type PropertyUnitAvgAggregateOutputType = {
|
|
|
16
16
|
floorNumber: number | null;
|
|
17
17
|
priceOverride: number | null;
|
|
18
18
|
areaOverride: number | null;
|
|
19
|
+
version: number | null;
|
|
19
20
|
};
|
|
20
21
|
export type PropertyUnitSumAggregateOutputType = {
|
|
21
22
|
floorNumber: number | null;
|
|
22
23
|
priceOverride: number | null;
|
|
23
24
|
areaOverride: number | null;
|
|
25
|
+
version: number | null;
|
|
24
26
|
};
|
|
25
27
|
export type PropertyUnitMinAggregateOutputType = {
|
|
26
28
|
id: string | null;
|
|
@@ -37,6 +39,7 @@ export type PropertyUnitMinAggregateOutputType = {
|
|
|
37
39
|
reservedUntil: Date | null;
|
|
38
40
|
reservedById: string | null;
|
|
39
41
|
ownerId: string | null;
|
|
42
|
+
version: number | null;
|
|
40
43
|
createdAt: Date | null;
|
|
41
44
|
updatedAt: Date | null;
|
|
42
45
|
};
|
|
@@ -55,6 +58,7 @@ export type PropertyUnitMaxAggregateOutputType = {
|
|
|
55
58
|
reservedUntil: Date | null;
|
|
56
59
|
reservedById: string | null;
|
|
57
60
|
ownerId: string | null;
|
|
61
|
+
version: number | null;
|
|
58
62
|
createdAt: Date | null;
|
|
59
63
|
updatedAt: Date | null;
|
|
60
64
|
};
|
|
@@ -73,6 +77,7 @@ export type PropertyUnitCountAggregateOutputType = {
|
|
|
73
77
|
reservedUntil: number;
|
|
74
78
|
reservedById: number;
|
|
75
79
|
ownerId: number;
|
|
80
|
+
version: number;
|
|
76
81
|
createdAt: number;
|
|
77
82
|
updatedAt: number;
|
|
78
83
|
_all: number;
|
|
@@ -81,11 +86,13 @@ export type PropertyUnitAvgAggregateInputType = {
|
|
|
81
86
|
floorNumber?: true;
|
|
82
87
|
priceOverride?: true;
|
|
83
88
|
areaOverride?: true;
|
|
89
|
+
version?: true;
|
|
84
90
|
};
|
|
85
91
|
export type PropertyUnitSumAggregateInputType = {
|
|
86
92
|
floorNumber?: true;
|
|
87
93
|
priceOverride?: true;
|
|
88
94
|
areaOverride?: true;
|
|
95
|
+
version?: true;
|
|
89
96
|
};
|
|
90
97
|
export type PropertyUnitMinAggregateInputType = {
|
|
91
98
|
id?: true;
|
|
@@ -102,6 +109,7 @@ export type PropertyUnitMinAggregateInputType = {
|
|
|
102
109
|
reservedUntil?: true;
|
|
103
110
|
reservedById?: true;
|
|
104
111
|
ownerId?: true;
|
|
112
|
+
version?: true;
|
|
105
113
|
createdAt?: true;
|
|
106
114
|
updatedAt?: true;
|
|
107
115
|
};
|
|
@@ -120,6 +128,7 @@ export type PropertyUnitMaxAggregateInputType = {
|
|
|
120
128
|
reservedUntil?: true;
|
|
121
129
|
reservedById?: true;
|
|
122
130
|
ownerId?: true;
|
|
131
|
+
version?: true;
|
|
123
132
|
createdAt?: true;
|
|
124
133
|
updatedAt?: true;
|
|
125
134
|
};
|
|
@@ -138,6 +147,7 @@ export type PropertyUnitCountAggregateInputType = {
|
|
|
138
147
|
reservedUntil?: true;
|
|
139
148
|
reservedById?: true;
|
|
140
149
|
ownerId?: true;
|
|
150
|
+
version?: true;
|
|
141
151
|
createdAt?: true;
|
|
142
152
|
updatedAt?: true;
|
|
143
153
|
_all?: true;
|
|
@@ -233,6 +243,7 @@ export type PropertyUnitGroupByOutputType = {
|
|
|
233
243
|
reservedUntil: Date | null;
|
|
234
244
|
reservedById: string | null;
|
|
235
245
|
ownerId: string | null;
|
|
246
|
+
version: number;
|
|
236
247
|
createdAt: Date;
|
|
237
248
|
updatedAt: Date;
|
|
238
249
|
_count: PropertyUnitCountAggregateOutputType | null;
|
|
@@ -262,6 +273,7 @@ export type PropertyUnitWhereInput = {
|
|
|
262
273
|
reservedUntil?: Prisma.DateTimeNullableFilter<"PropertyUnit"> | Date | string | null;
|
|
263
274
|
reservedById?: Prisma.StringNullableFilter<"PropertyUnit"> | string | null;
|
|
264
275
|
ownerId?: Prisma.StringNullableFilter<"PropertyUnit"> | string | null;
|
|
276
|
+
version?: Prisma.IntFilter<"PropertyUnit"> | number;
|
|
265
277
|
createdAt?: Prisma.DateTimeFilter<"PropertyUnit"> | Date | string;
|
|
266
278
|
updatedAt?: Prisma.DateTimeFilter<"PropertyUnit"> | Date | string;
|
|
267
279
|
tenant?: Prisma.XOR<Prisma.TenantScalarRelationFilter, Prisma.TenantWhereInput>;
|
|
@@ -284,6 +296,7 @@ export type PropertyUnitOrderByWithRelationInput = {
|
|
|
284
296
|
reservedUntil?: Prisma.SortOrderInput | Prisma.SortOrder;
|
|
285
297
|
reservedById?: Prisma.SortOrderInput | Prisma.SortOrder;
|
|
286
298
|
ownerId?: Prisma.SortOrderInput | Prisma.SortOrder;
|
|
299
|
+
version?: Prisma.SortOrder;
|
|
287
300
|
createdAt?: Prisma.SortOrder;
|
|
288
301
|
updatedAt?: Prisma.SortOrder;
|
|
289
302
|
tenant?: Prisma.TenantOrderByWithRelationInput;
|
|
@@ -311,6 +324,7 @@ export type PropertyUnitWhereUniqueInput = Prisma.AtLeast<{
|
|
|
311
324
|
reservedUntil?: Prisma.DateTimeNullableFilter<"PropertyUnit"> | Date | string | null;
|
|
312
325
|
reservedById?: Prisma.StringNullableFilter<"PropertyUnit"> | string | null;
|
|
313
326
|
ownerId?: Prisma.StringNullableFilter<"PropertyUnit"> | string | null;
|
|
327
|
+
version?: Prisma.IntFilter<"PropertyUnit"> | number;
|
|
314
328
|
createdAt?: Prisma.DateTimeFilter<"PropertyUnit"> | Date | string;
|
|
315
329
|
updatedAt?: Prisma.DateTimeFilter<"PropertyUnit"> | Date | string;
|
|
316
330
|
tenant?: Prisma.XOR<Prisma.TenantScalarRelationFilter, Prisma.TenantWhereInput>;
|
|
@@ -333,6 +347,7 @@ export type PropertyUnitOrderByWithAggregationInput = {
|
|
|
333
347
|
reservedUntil?: Prisma.SortOrderInput | Prisma.SortOrder;
|
|
334
348
|
reservedById?: Prisma.SortOrderInput | Prisma.SortOrder;
|
|
335
349
|
ownerId?: Prisma.SortOrderInput | Prisma.SortOrder;
|
|
350
|
+
version?: Prisma.SortOrder;
|
|
336
351
|
createdAt?: Prisma.SortOrder;
|
|
337
352
|
updatedAt?: Prisma.SortOrder;
|
|
338
353
|
_count?: Prisma.PropertyUnitCountOrderByAggregateInput;
|
|
@@ -359,6 +374,7 @@ export type PropertyUnitScalarWhereWithAggregatesInput = {
|
|
|
359
374
|
reservedUntil?: Prisma.DateTimeNullableWithAggregatesFilter<"PropertyUnit"> | Date | string | null;
|
|
360
375
|
reservedById?: Prisma.StringNullableWithAggregatesFilter<"PropertyUnit"> | string | null;
|
|
361
376
|
ownerId?: Prisma.StringNullableWithAggregatesFilter<"PropertyUnit"> | string | null;
|
|
377
|
+
version?: Prisma.IntWithAggregatesFilter<"PropertyUnit"> | number;
|
|
362
378
|
createdAt?: Prisma.DateTimeWithAggregatesFilter<"PropertyUnit"> | Date | string;
|
|
363
379
|
updatedAt?: Prisma.DateTimeWithAggregatesFilter<"PropertyUnit"> | Date | string;
|
|
364
380
|
};
|
|
@@ -375,6 +391,7 @@ export type PropertyUnitCreateInput = {
|
|
|
375
391
|
reservedUntil?: Date | string | null;
|
|
376
392
|
reservedById?: string | null;
|
|
377
393
|
ownerId?: string | null;
|
|
394
|
+
version?: number;
|
|
378
395
|
createdAt?: Date | string;
|
|
379
396
|
updatedAt?: Date | string;
|
|
380
397
|
tenant: Prisma.TenantCreateNestedOneWithoutPropertyUnitsInput;
|
|
@@ -397,6 +414,7 @@ export type PropertyUnitUncheckedCreateInput = {
|
|
|
397
414
|
reservedUntil?: Date | string | null;
|
|
398
415
|
reservedById?: string | null;
|
|
399
416
|
ownerId?: string | null;
|
|
417
|
+
version?: number;
|
|
400
418
|
createdAt?: Date | string;
|
|
401
419
|
updatedAt?: Date | string;
|
|
402
420
|
applications?: Prisma.ApplicationUncheckedCreateNestedManyWithoutPropertyUnitInput;
|
|
@@ -415,6 +433,7 @@ export type PropertyUnitUpdateInput = {
|
|
|
415
433
|
reservedUntil?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
|
|
416
434
|
reservedById?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
|
|
417
435
|
ownerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
|
|
436
|
+
version?: Prisma.IntFieldUpdateOperationsInput | number;
|
|
418
437
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
|
|
419
438
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
|
|
420
439
|
tenant?: Prisma.TenantUpdateOneRequiredWithoutPropertyUnitsNestedInput;
|
|
@@ -437,6 +456,7 @@ export type PropertyUnitUncheckedUpdateInput = {
|
|
|
437
456
|
reservedUntil?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
|
|
438
457
|
reservedById?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
|
|
439
458
|
ownerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
|
|
459
|
+
version?: Prisma.IntFieldUpdateOperationsInput | number;
|
|
440
460
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
|
|
441
461
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
|
|
442
462
|
applications?: Prisma.ApplicationUncheckedUpdateManyWithoutPropertyUnitNestedInput;
|
|
@@ -457,6 +477,7 @@ export type PropertyUnitCreateManyInput = {
|
|
|
457
477
|
reservedUntil?: Date | string | null;
|
|
458
478
|
reservedById?: string | null;
|
|
459
479
|
ownerId?: string | null;
|
|
480
|
+
version?: number;
|
|
460
481
|
createdAt?: Date | string;
|
|
461
482
|
updatedAt?: Date | string;
|
|
462
483
|
};
|
|
@@ -473,6 +494,7 @@ export type PropertyUnitUpdateManyMutationInput = {
|
|
|
473
494
|
reservedUntil?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
|
|
474
495
|
reservedById?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
|
|
475
496
|
ownerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
|
|
497
|
+
version?: Prisma.IntFieldUpdateOperationsInput | number;
|
|
476
498
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
|
|
477
499
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
|
|
478
500
|
};
|
|
@@ -491,6 +513,7 @@ export type PropertyUnitUncheckedUpdateManyInput = {
|
|
|
491
513
|
reservedUntil?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
|
|
492
514
|
reservedById?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
|
|
493
515
|
ownerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
|
|
516
|
+
version?: Prisma.IntFieldUpdateOperationsInput | number;
|
|
494
517
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
|
|
495
518
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
|
|
496
519
|
};
|
|
@@ -526,6 +549,7 @@ export type PropertyUnitCountOrderByAggregateInput = {
|
|
|
526
549
|
reservedUntil?: Prisma.SortOrder;
|
|
527
550
|
reservedById?: Prisma.SortOrder;
|
|
528
551
|
ownerId?: Prisma.SortOrder;
|
|
552
|
+
version?: Prisma.SortOrder;
|
|
529
553
|
createdAt?: Prisma.SortOrder;
|
|
530
554
|
updatedAt?: Prisma.SortOrder;
|
|
531
555
|
};
|
|
@@ -533,6 +557,7 @@ export type PropertyUnitAvgOrderByAggregateInput = {
|
|
|
533
557
|
floorNumber?: Prisma.SortOrder;
|
|
534
558
|
priceOverride?: Prisma.SortOrder;
|
|
535
559
|
areaOverride?: Prisma.SortOrder;
|
|
560
|
+
version?: Prisma.SortOrder;
|
|
536
561
|
};
|
|
537
562
|
export type PropertyUnitMaxOrderByAggregateInput = {
|
|
538
563
|
id?: Prisma.SortOrder;
|
|
@@ -549,6 +574,7 @@ export type PropertyUnitMaxOrderByAggregateInput = {
|
|
|
549
574
|
reservedUntil?: Prisma.SortOrder;
|
|
550
575
|
reservedById?: Prisma.SortOrder;
|
|
551
576
|
ownerId?: Prisma.SortOrder;
|
|
577
|
+
version?: Prisma.SortOrder;
|
|
552
578
|
createdAt?: Prisma.SortOrder;
|
|
553
579
|
updatedAt?: Prisma.SortOrder;
|
|
554
580
|
};
|
|
@@ -567,6 +593,7 @@ export type PropertyUnitMinOrderByAggregateInput = {
|
|
|
567
593
|
reservedUntil?: Prisma.SortOrder;
|
|
568
594
|
reservedById?: Prisma.SortOrder;
|
|
569
595
|
ownerId?: Prisma.SortOrder;
|
|
596
|
+
version?: Prisma.SortOrder;
|
|
570
597
|
createdAt?: Prisma.SortOrder;
|
|
571
598
|
updatedAt?: Prisma.SortOrder;
|
|
572
599
|
};
|
|
@@ -574,6 +601,7 @@ export type PropertyUnitSumOrderByAggregateInput = {
|
|
|
574
601
|
floorNumber?: Prisma.SortOrder;
|
|
575
602
|
priceOverride?: Prisma.SortOrder;
|
|
576
603
|
areaOverride?: Prisma.SortOrder;
|
|
604
|
+
version?: Prisma.SortOrder;
|
|
577
605
|
};
|
|
578
606
|
export type PropertyUnitScalarRelationFilter = {
|
|
579
607
|
is?: Prisma.PropertyUnitWhereInput;
|
|
@@ -692,6 +720,7 @@ export type PropertyUnitCreateWithoutTenantInput = {
|
|
|
692
720
|
reservedUntil?: Date | string | null;
|
|
693
721
|
reservedById?: string | null;
|
|
694
722
|
ownerId?: string | null;
|
|
723
|
+
version?: number;
|
|
695
724
|
createdAt?: Date | string;
|
|
696
725
|
updatedAt?: Date | string;
|
|
697
726
|
variant: Prisma.PropertyVariantCreateNestedOneWithoutUnitsInput;
|
|
@@ -712,6 +741,7 @@ export type PropertyUnitUncheckedCreateWithoutTenantInput = {
|
|
|
712
741
|
reservedUntil?: Date | string | null;
|
|
713
742
|
reservedById?: string | null;
|
|
714
743
|
ownerId?: string | null;
|
|
744
|
+
version?: number;
|
|
715
745
|
createdAt?: Date | string;
|
|
716
746
|
updatedAt?: Date | string;
|
|
717
747
|
applications?: Prisma.ApplicationUncheckedCreateNestedManyWithoutPropertyUnitInput;
|
|
@@ -756,6 +786,7 @@ export type PropertyUnitScalarWhereInput = {
|
|
|
756
786
|
reservedUntil?: Prisma.DateTimeNullableFilter<"PropertyUnit"> | Date | string | null;
|
|
757
787
|
reservedById?: Prisma.StringNullableFilter<"PropertyUnit"> | string | null;
|
|
758
788
|
ownerId?: Prisma.StringNullableFilter<"PropertyUnit"> | string | null;
|
|
789
|
+
version?: Prisma.IntFilter<"PropertyUnit"> | number;
|
|
759
790
|
createdAt?: Prisma.DateTimeFilter<"PropertyUnit"> | Date | string;
|
|
760
791
|
updatedAt?: Prisma.DateTimeFilter<"PropertyUnit"> | Date | string;
|
|
761
792
|
};
|
|
@@ -772,6 +803,7 @@ export type PropertyUnitCreateWithoutVariantInput = {
|
|
|
772
803
|
reservedUntil?: Date | string | null;
|
|
773
804
|
reservedById?: string | null;
|
|
774
805
|
ownerId?: string | null;
|
|
806
|
+
version?: number;
|
|
775
807
|
createdAt?: Date | string;
|
|
776
808
|
updatedAt?: Date | string;
|
|
777
809
|
tenant: Prisma.TenantCreateNestedOneWithoutPropertyUnitsInput;
|
|
@@ -792,6 +824,7 @@ export type PropertyUnitUncheckedCreateWithoutVariantInput = {
|
|
|
792
824
|
reservedUntil?: Date | string | null;
|
|
793
825
|
reservedById?: string | null;
|
|
794
826
|
ownerId?: string | null;
|
|
827
|
+
version?: number;
|
|
795
828
|
createdAt?: Date | string;
|
|
796
829
|
updatedAt?: Date | string;
|
|
797
830
|
applications?: Prisma.ApplicationUncheckedCreateNestedManyWithoutPropertyUnitInput;
|
|
@@ -831,6 +864,7 @@ export type PropertyUnitCreateWithoutApplicationsInput = {
|
|
|
831
864
|
reservedUntil?: Date | string | null;
|
|
832
865
|
reservedById?: string | null;
|
|
833
866
|
ownerId?: string | null;
|
|
867
|
+
version?: number;
|
|
834
868
|
createdAt?: Date | string;
|
|
835
869
|
updatedAt?: Date | string;
|
|
836
870
|
tenant: Prisma.TenantCreateNestedOneWithoutPropertyUnitsInput;
|
|
@@ -852,6 +886,7 @@ export type PropertyUnitUncheckedCreateWithoutApplicationsInput = {
|
|
|
852
886
|
reservedUntil?: Date | string | null;
|
|
853
887
|
reservedById?: string | null;
|
|
854
888
|
ownerId?: string | null;
|
|
889
|
+
version?: number;
|
|
855
890
|
createdAt?: Date | string;
|
|
856
891
|
updatedAt?: Date | string;
|
|
857
892
|
transferRequests?: Prisma.PropertyTransferRequestUncheckedCreateNestedManyWithoutTargetPropertyUnitInput;
|
|
@@ -882,6 +917,7 @@ export type PropertyUnitUpdateWithoutApplicationsInput = {
|
|
|
882
917
|
reservedUntil?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
|
|
883
918
|
reservedById?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
|
|
884
919
|
ownerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
|
|
920
|
+
version?: Prisma.IntFieldUpdateOperationsInput | number;
|
|
885
921
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
|
|
886
922
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
|
|
887
923
|
tenant?: Prisma.TenantUpdateOneRequiredWithoutPropertyUnitsNestedInput;
|
|
@@ -903,6 +939,7 @@ export type PropertyUnitUncheckedUpdateWithoutApplicationsInput = {
|
|
|
903
939
|
reservedUntil?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
|
|
904
940
|
reservedById?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
|
|
905
941
|
ownerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
|
|
942
|
+
version?: Prisma.IntFieldUpdateOperationsInput | number;
|
|
906
943
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
|
|
907
944
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
|
|
908
945
|
transferRequests?: Prisma.PropertyTransferRequestUncheckedUpdateManyWithoutTargetPropertyUnitNestedInput;
|
|
@@ -920,6 +957,7 @@ export type PropertyUnitCreateWithoutTransferRequestsInput = {
|
|
|
920
957
|
reservedUntil?: Date | string | null;
|
|
921
958
|
reservedById?: string | null;
|
|
922
959
|
ownerId?: string | null;
|
|
960
|
+
version?: number;
|
|
923
961
|
createdAt?: Date | string;
|
|
924
962
|
updatedAt?: Date | string;
|
|
925
963
|
tenant: Prisma.TenantCreateNestedOneWithoutPropertyUnitsInput;
|
|
@@ -941,6 +979,7 @@ export type PropertyUnitUncheckedCreateWithoutTransferRequestsInput = {
|
|
|
941
979
|
reservedUntil?: Date | string | null;
|
|
942
980
|
reservedById?: string | null;
|
|
943
981
|
ownerId?: string | null;
|
|
982
|
+
version?: number;
|
|
944
983
|
createdAt?: Date | string;
|
|
945
984
|
updatedAt?: Date | string;
|
|
946
985
|
applications?: Prisma.ApplicationUncheckedCreateNestedManyWithoutPropertyUnitInput;
|
|
@@ -971,6 +1010,7 @@ export type PropertyUnitUpdateWithoutTransferRequestsInput = {
|
|
|
971
1010
|
reservedUntil?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
|
|
972
1011
|
reservedById?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
|
|
973
1012
|
ownerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
|
|
1013
|
+
version?: Prisma.IntFieldUpdateOperationsInput | number;
|
|
974
1014
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
|
|
975
1015
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
|
|
976
1016
|
tenant?: Prisma.TenantUpdateOneRequiredWithoutPropertyUnitsNestedInput;
|
|
@@ -992,6 +1032,7 @@ export type PropertyUnitUncheckedUpdateWithoutTransferRequestsInput = {
|
|
|
992
1032
|
reservedUntil?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
|
|
993
1033
|
reservedById?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
|
|
994
1034
|
ownerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
|
|
1035
|
+
version?: Prisma.IntFieldUpdateOperationsInput | number;
|
|
995
1036
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
|
|
996
1037
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
|
|
997
1038
|
applications?: Prisma.ApplicationUncheckedUpdateManyWithoutPropertyUnitNestedInput;
|
|
@@ -1010,6 +1051,7 @@ export type PropertyUnitCreateManyTenantInput = {
|
|
|
1010
1051
|
reservedUntil?: Date | string | null;
|
|
1011
1052
|
reservedById?: string | null;
|
|
1012
1053
|
ownerId?: string | null;
|
|
1054
|
+
version?: number;
|
|
1013
1055
|
createdAt?: Date | string;
|
|
1014
1056
|
updatedAt?: Date | string;
|
|
1015
1057
|
};
|
|
@@ -1026,6 +1068,7 @@ export type PropertyUnitUpdateWithoutTenantInput = {
|
|
|
1026
1068
|
reservedUntil?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
|
|
1027
1069
|
reservedById?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
|
|
1028
1070
|
ownerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
|
|
1071
|
+
version?: Prisma.IntFieldUpdateOperationsInput | number;
|
|
1029
1072
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
|
|
1030
1073
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
|
|
1031
1074
|
variant?: Prisma.PropertyVariantUpdateOneRequiredWithoutUnitsNestedInput;
|
|
@@ -1046,6 +1089,7 @@ export type PropertyUnitUncheckedUpdateWithoutTenantInput = {
|
|
|
1046
1089
|
reservedUntil?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
|
|
1047
1090
|
reservedById?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
|
|
1048
1091
|
ownerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
|
|
1092
|
+
version?: Prisma.IntFieldUpdateOperationsInput | number;
|
|
1049
1093
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
|
|
1050
1094
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
|
|
1051
1095
|
applications?: Prisma.ApplicationUncheckedUpdateManyWithoutPropertyUnitNestedInput;
|
|
@@ -1065,6 +1109,7 @@ export type PropertyUnitUncheckedUpdateManyWithoutTenantInput = {
|
|
|
1065
1109
|
reservedUntil?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
|
|
1066
1110
|
reservedById?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
|
|
1067
1111
|
ownerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
|
|
1112
|
+
version?: Prisma.IntFieldUpdateOperationsInput | number;
|
|
1068
1113
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
|
|
1069
1114
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
|
|
1070
1115
|
};
|
|
@@ -1082,6 +1127,7 @@ export type PropertyUnitCreateManyVariantInput = {
|
|
|
1082
1127
|
reservedUntil?: Date | string | null;
|
|
1083
1128
|
reservedById?: string | null;
|
|
1084
1129
|
ownerId?: string | null;
|
|
1130
|
+
version?: number;
|
|
1085
1131
|
createdAt?: Date | string;
|
|
1086
1132
|
updatedAt?: Date | string;
|
|
1087
1133
|
};
|
|
@@ -1098,6 +1144,7 @@ export type PropertyUnitUpdateWithoutVariantInput = {
|
|
|
1098
1144
|
reservedUntil?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
|
|
1099
1145
|
reservedById?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
|
|
1100
1146
|
ownerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
|
|
1147
|
+
version?: Prisma.IntFieldUpdateOperationsInput | number;
|
|
1101
1148
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
|
|
1102
1149
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
|
|
1103
1150
|
tenant?: Prisma.TenantUpdateOneRequiredWithoutPropertyUnitsNestedInput;
|
|
@@ -1118,6 +1165,7 @@ export type PropertyUnitUncheckedUpdateWithoutVariantInput = {
|
|
|
1118
1165
|
reservedUntil?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
|
|
1119
1166
|
reservedById?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
|
|
1120
1167
|
ownerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
|
|
1168
|
+
version?: Prisma.IntFieldUpdateOperationsInput | number;
|
|
1121
1169
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
|
|
1122
1170
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
|
|
1123
1171
|
applications?: Prisma.ApplicationUncheckedUpdateManyWithoutPropertyUnitNestedInput;
|
|
@@ -1137,6 +1185,7 @@ export type PropertyUnitUncheckedUpdateManyWithoutVariantInput = {
|
|
|
1137
1185
|
reservedUntil?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
|
|
1138
1186
|
reservedById?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
|
|
1139
1187
|
ownerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
|
|
1188
|
+
version?: Prisma.IntFieldUpdateOperationsInput | number;
|
|
1140
1189
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
|
|
1141
1190
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
|
|
1142
1191
|
};
|
|
@@ -1187,6 +1236,7 @@ export type PropertyUnitSelect<ExtArgs extends runtime.Types.Extensions.Internal
|
|
|
1187
1236
|
reservedUntil?: boolean;
|
|
1188
1237
|
reservedById?: boolean;
|
|
1189
1238
|
ownerId?: boolean;
|
|
1239
|
+
version?: boolean;
|
|
1190
1240
|
createdAt?: boolean;
|
|
1191
1241
|
updatedAt?: boolean;
|
|
1192
1242
|
tenant?: boolean | Prisma.TenantDefaultArgs<ExtArgs>;
|
|
@@ -1210,10 +1260,11 @@ export type PropertyUnitSelectScalar = {
|
|
|
1210
1260
|
reservedUntil?: boolean;
|
|
1211
1261
|
reservedById?: boolean;
|
|
1212
1262
|
ownerId?: boolean;
|
|
1263
|
+
version?: boolean;
|
|
1213
1264
|
createdAt?: boolean;
|
|
1214
1265
|
updatedAt?: boolean;
|
|
1215
1266
|
};
|
|
1216
|
-
export type PropertyUnitOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "tenantId" | "variantId" | "unitNumber" | "floorNumber" | "blockName" | "priceOverride" | "areaOverride" | "notes" | "status" | "reservedAt" | "reservedUntil" | "reservedById" | "ownerId" | "createdAt" | "updatedAt", ExtArgs["result"]["propertyUnit"]>;
|
|
1267
|
+
export type PropertyUnitOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "tenantId" | "variantId" | "unitNumber" | "floorNumber" | "blockName" | "priceOverride" | "areaOverride" | "notes" | "status" | "reservedAt" | "reservedUntil" | "reservedById" | "ownerId" | "version" | "createdAt" | "updatedAt", ExtArgs["result"]["propertyUnit"]>;
|
|
1217
1268
|
export type PropertyUnitInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
1218
1269
|
tenant?: boolean | Prisma.TenantDefaultArgs<ExtArgs>;
|
|
1219
1270
|
variant?: boolean | Prisma.PropertyVariantDefaultArgs<ExtArgs>;
|
|
@@ -1244,6 +1295,7 @@ export type $PropertyUnitPayload<ExtArgs extends runtime.Types.Extensions.Intern
|
|
|
1244
1295
|
reservedUntil: Date | null;
|
|
1245
1296
|
reservedById: string | null;
|
|
1246
1297
|
ownerId: string | null;
|
|
1298
|
+
version: number;
|
|
1247
1299
|
createdAt: Date;
|
|
1248
1300
|
updatedAt: Date;
|
|
1249
1301
|
}, ExtArgs["result"]["propertyUnit"]>;
|
|
@@ -1566,6 +1618,7 @@ export interface PropertyUnitFieldRefs {
|
|
|
1566
1618
|
readonly reservedUntil: Prisma.FieldRef<"PropertyUnit", 'DateTime'>;
|
|
1567
1619
|
readonly reservedById: Prisma.FieldRef<"PropertyUnit", 'String'>;
|
|
1568
1620
|
readonly ownerId: Prisma.FieldRef<"PropertyUnit", 'String'>;
|
|
1621
|
+
readonly version: Prisma.FieldRef<"PropertyUnit", 'Int'>;
|
|
1569
1622
|
readonly createdAt: Prisma.FieldRef<"PropertyUnit", 'DateTime'>;
|
|
1570
1623
|
readonly updatedAt: Prisma.FieldRef<"PropertyUnit", 'DateTime'>;
|
|
1571
1624
|
}
|
package/package.json
CHANGED
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Warnings:
|
|
3
|
+
|
|
4
|
+
- You are about to drop the `event_handler_executions` table. If the table is not empty, all the data it contains will be lost.
|
|
5
|
+
- You are about to drop the `workflow_events` table. If the table is not empty, all the data it contains will be lost.
|
|
6
|
+
|
|
7
|
+
*/
|
|
8
|
+
-- DropForeignKey
|
|
9
|
+
ALTER TABLE `event_handler_executions` DROP FOREIGN KEY `event_handler_executions_eventId_fkey`;
|
|
10
|
+
|
|
11
|
+
-- DropForeignKey
|
|
12
|
+
ALTER TABLE `event_handler_executions` DROP FOREIGN KEY `event_handler_executions_handlerId_fkey`;
|
|
13
|
+
|
|
14
|
+
-- DropForeignKey
|
|
15
|
+
ALTER TABLE `event_handler_executions` DROP FOREIGN KEY `event_handler_executions_tenantId_fkey`;
|
|
16
|
+
|
|
17
|
+
-- DropForeignKey
|
|
18
|
+
ALTER TABLE `workflow_events` DROP FOREIGN KEY `workflow_events_eventTypeId_fkey`;
|
|
19
|
+
|
|
20
|
+
-- DropForeignKey
|
|
21
|
+
ALTER TABLE `workflow_events` DROP FOREIGN KEY `workflow_events_tenantId_fkey`;
|
|
22
|
+
|
|
23
|
+
-- AlterTable
|
|
24
|
+
ALTER TABLE `application_documents` ADD COLUMN `documentDate` DATETIME(3) NULL,
|
|
25
|
+
ADD COLUMN `expectedOrganizationId` VARCHAR(191) NULL,
|
|
26
|
+
ADD COLUMN `expectedUploader` ENUM('CUSTOMER', 'LENDER', 'DEVELOPER', 'LEGAL', 'INSURER', 'PLATFORM') NULL,
|
|
27
|
+
ADD COLUMN `expiredAt` DATETIME(3) NULL,
|
|
28
|
+
ADD COLUMN `expiresAt` DATETIME(3) NULL,
|
|
29
|
+
ADD COLUMN `expiryDays` INTEGER NULL,
|
|
30
|
+
ADD COLUMN `expiryWarningAt` DATETIME(3) NULL,
|
|
31
|
+
ADD COLUMN `isExpired` BOOLEAN NOT NULL DEFAULT false,
|
|
32
|
+
ADD COLUMN `revalidatedAt` DATETIME(3) NULL;
|
|
33
|
+
|
|
34
|
+
-- AlterTable
|
|
35
|
+
ALTER TABLE `application_events` MODIFY `eventGroup` ENUM('STATE_CHANGE', 'PAYMENT', 'DOCUMENT', 'NOTIFICATION', 'WORKFLOW', 'AUTOMATION') NULL,
|
|
36
|
+
MODIFY `eventType` ENUM('APPLICATION_CREATED', 'APPLICATION_STATE_CHANGED', 'PHASE_ACTIVATED', 'PHASE_COMPLETED', 'STEP_COMPLETED', 'STEP_REJECTED', 'DOCUMENT_SUBMITTED', 'DOCUMENT_APPROVED', 'DOCUMENT_REJECTED', 'PAYMENT_INITIATED', 'PAYMENT_COMPLETED', 'PAYMENT_FAILED', 'INSTALLMENTS_GENERATED', 'APPLICATION_SIGNED', 'APPLICATION_TERMINATED', 'APPLICATION_TRANSFERRED', 'UNDERWRITING_COMPLETED', 'OFFER_LETTER_GENERATED', 'HANDLER_EXECUTED') NOT NULL;
|
|
37
|
+
|
|
38
|
+
-- AlterTable
|
|
39
|
+
ALTER TABLE `applications` ADD COLUMN `paymentMethodSnapshot` JSON NULL,
|
|
40
|
+
ADD COLUMN `paymentMethodSnapshotAt` DATETIME(3) NULL,
|
|
41
|
+
ADD COLUMN `paymentMethodSnapshotHash` VARCHAR(191) NULL;
|
|
42
|
+
|
|
43
|
+
-- DropTable
|
|
44
|
+
DROP TABLE `event_handler_executions`;
|
|
45
|
+
|
|
46
|
+
-- DropTable
|
|
47
|
+
DROP TABLE `workflow_events`;
|
|
48
|
+
|
|
49
|
+
-- CreateTable
|
|
50
|
+
CREATE TABLE `bank_document_requirements` (
|
|
51
|
+
`id` VARCHAR(191) NOT NULL,
|
|
52
|
+
`tenantId` VARCHAR(191) NOT NULL,
|
|
53
|
+
`organizationId` VARCHAR(191) NOT NULL,
|
|
54
|
+
`phaseType` VARCHAR(191) NOT NULL,
|
|
55
|
+
`paymentMethodId` VARCHAR(191) NULL,
|
|
56
|
+
`documentType` VARCHAR(191) NOT NULL,
|
|
57
|
+
`documentName` VARCHAR(191) NOT NULL,
|
|
58
|
+
`modifier` ENUM('REQUIRED', 'OPTIONAL', 'NOT_REQUIRED', 'STRICTER') NOT NULL DEFAULT 'REQUIRED',
|
|
59
|
+
`description` TEXT NULL,
|
|
60
|
+
`expiryDays` INTEGER NULL,
|
|
61
|
+
`minFiles` INTEGER NULL,
|
|
62
|
+
`maxFiles` INTEGER NULL,
|
|
63
|
+
`allowedMimeTypes` VARCHAR(191) NULL,
|
|
64
|
+
`validationRules` JSON NULL,
|
|
65
|
+
`priority` INTEGER NOT NULL DEFAULT 100,
|
|
66
|
+
`isActive` BOOLEAN NOT NULL DEFAULT true,
|
|
67
|
+
`createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
|
|
68
|
+
`updatedAt` DATETIME(3) NOT NULL,
|
|
69
|
+
|
|
70
|
+
INDEX `bank_document_requirements_tenantId_idx`(`tenantId`),
|
|
71
|
+
INDEX `bank_document_requirements_organizationId_idx`(`organizationId`),
|
|
72
|
+
INDEX `bank_document_requirements_phaseType_idx`(`phaseType`),
|
|
73
|
+
INDEX `bank_document_requirements_documentType_idx`(`documentType`),
|
|
74
|
+
INDEX `bank_document_requirements_paymentMethodId_idx`(`paymentMethodId`),
|
|
75
|
+
UNIQUE INDEX `bank_document_requirements_organizationId_phaseType_document_key`(`organizationId`, `phaseType`, `documentType`, `paymentMethodId`),
|
|
76
|
+
PRIMARY KEY (`id`)
|
|
77
|
+
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
|
78
|
+
|
|
79
|
+
-- CreateTable
|
|
80
|
+
CREATE TABLE `application_organizations` (
|
|
81
|
+
`id` VARCHAR(191) NOT NULL,
|
|
82
|
+
`tenantId` VARCHAR(191) NOT NULL,
|
|
83
|
+
`applicationId` VARCHAR(191) NOT NULL,
|
|
84
|
+
`organizationId` VARCHAR(191) NOT NULL,
|
|
85
|
+
`role` ENUM('DEVELOPER', 'LENDER', 'LEGAL', 'INSURER', 'GOVERNMENT') NOT NULL,
|
|
86
|
+
`status` ENUM('PENDING', 'ACTIVE', 'COMPLETED', 'DECLINED', 'WITHDRAWN') NOT NULL DEFAULT 'PENDING',
|
|
87
|
+
`assignedById` VARCHAR(191) NULL,
|
|
88
|
+
`assignedAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
|
|
89
|
+
`isPrimary` BOOLEAN NOT NULL DEFAULT false,
|
|
90
|
+
`offeredTerms` JSON NULL,
|
|
91
|
+
`termsOfferedAt` DATETIME(3) NULL,
|
|
92
|
+
`termsAcceptedAt` DATETIME(3) NULL,
|
|
93
|
+
`termsDeclinedAt` DATETIME(3) NULL,
|
|
94
|
+
`declineReason` TEXT NULL,
|
|
95
|
+
`activatedAt` DATETIME(3) NULL,
|
|
96
|
+
`completedAt` DATETIME(3) NULL,
|
|
97
|
+
`withdrawnAt` DATETIME(3) NULL,
|
|
98
|
+
`slaHours` INTEGER NULL,
|
|
99
|
+
`slaStartedAt` DATETIME(3) NULL,
|
|
100
|
+
`slaBreachedAt` DATETIME(3) NULL,
|
|
101
|
+
`slaBreachNotified` BOOLEAN NOT NULL DEFAULT false,
|
|
102
|
+
`reminderCount` INTEGER NOT NULL DEFAULT 0,
|
|
103
|
+
`lastReminderSentAt` DATETIME(3) NULL,
|
|
104
|
+
`nextReminderAt` DATETIME(3) NULL,
|
|
105
|
+
`escalatedAt` DATETIME(3) NULL,
|
|
106
|
+
`escalatedToUserId` VARCHAR(191) NULL,
|
|
107
|
+
`escalationNotes` TEXT NULL,
|
|
108
|
+
`createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
|
|
109
|
+
`updatedAt` DATETIME(3) NOT NULL,
|
|
110
|
+
|
|
111
|
+
INDEX `application_organizations_tenantId_idx`(`tenantId`),
|
|
112
|
+
INDEX `application_organizations_applicationId_idx`(`applicationId`),
|
|
113
|
+
INDEX `application_organizations_organizationId_idx`(`organizationId`),
|
|
114
|
+
INDEX `application_organizations_role_idx`(`role`),
|
|
115
|
+
INDEX `application_organizations_status_idx`(`status`),
|
|
116
|
+
INDEX `application_organizations_isPrimary_idx`(`isPrimary`),
|
|
117
|
+
INDEX `application_organizations_slaBreachedAt_idx`(`slaBreachedAt`),
|
|
118
|
+
UNIQUE INDEX `application_organizations_applicationId_organizationId_role_key`(`applicationId`, `organizationId`, `role`),
|
|
119
|
+
PRIMARY KEY (`id`)
|
|
120
|
+
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
|
121
|
+
|
|
122
|
+
-- CreateTable
|
|
123
|
+
CREATE TABLE `scheduled_jobs` (
|
|
124
|
+
`id` VARCHAR(191) NOT NULL,
|
|
125
|
+
`tenantId` VARCHAR(191) NULL,
|
|
126
|
+
`jobType` ENUM('DOCUMENT_EXPIRY_CHECK', 'SLA_BREACH_CHECK', 'PAYMENT_REMINDER', 'DOCUMENT_EXPIRY_WARNING') NOT NULL,
|
|
127
|
+
`status` ENUM('PENDING', 'RUNNING', 'COMPLETED', 'FAILED', 'CANCELLED') NOT NULL DEFAULT 'PENDING',
|
|
128
|
+
`scheduledAt` DATETIME(3) NOT NULL,
|
|
129
|
+
`startedAt` DATETIME(3) NULL,
|
|
130
|
+
`completedAt` DATETIME(3) NULL,
|
|
131
|
+
`durationMs` INTEGER NULL,
|
|
132
|
+
`parameters` JSON NULL,
|
|
133
|
+
`itemsProcessed` INTEGER NOT NULL DEFAULT 0,
|
|
134
|
+
`itemsAffected` INTEGER NOT NULL DEFAULT 0,
|
|
135
|
+
`errorCount` INTEGER NOT NULL DEFAULT 0,
|
|
136
|
+
`errors` JSON NULL,
|
|
137
|
+
`summary` TEXT NULL,
|
|
138
|
+
`attemptNumber` INTEGER NOT NULL DEFAULT 1,
|
|
139
|
+
`maxAttempts` INTEGER NOT NULL DEFAULT 3,
|
|
140
|
+
`nextRetryAt` DATETIME(3) NULL,
|
|
141
|
+
`createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
|
|
142
|
+
`updatedAt` DATETIME(3) NOT NULL,
|
|
143
|
+
|
|
144
|
+
INDEX `scheduled_jobs_tenantId_idx`(`tenantId`),
|
|
145
|
+
INDEX `scheduled_jobs_jobType_idx`(`jobType`),
|
|
146
|
+
INDEX `scheduled_jobs_status_idx`(`status`),
|
|
147
|
+
INDEX `scheduled_jobs_scheduledAt_idx`(`scheduledAt`),
|
|
148
|
+
INDEX `scheduled_jobs_jobType_status_scheduledAt_idx`(`jobType`, `status`, `scheduledAt`),
|
|
149
|
+
PRIMARY KEY (`id`)
|
|
150
|
+
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
|
151
|
+
|
|
152
|
+
-- CreateTable
|
|
153
|
+
CREATE TABLE `document_expiry_warnings` (
|
|
154
|
+
`id` VARCHAR(191) NOT NULL,
|
|
155
|
+
`tenantId` VARCHAR(191) NOT NULL,
|
|
156
|
+
`documentId` VARCHAR(191) NOT NULL,
|
|
157
|
+
`expiresAt` DATETIME(3) NOT NULL,
|
|
158
|
+
`daysUntil` INTEGER NOT NULL,
|
|
159
|
+
`warningSent` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
|
|
160
|
+
`notificationSent` BOOLEAN NOT NULL DEFAULT false,
|
|
161
|
+
`notificationId` VARCHAR(191) NULL,
|
|
162
|
+
`resolved` BOOLEAN NOT NULL DEFAULT false,
|
|
163
|
+
`resolvedAt` DATETIME(3) NULL,
|
|
164
|
+
`resolvedBy` VARCHAR(191) NULL,
|
|
165
|
+
`newDocumentId` VARCHAR(191) NULL,
|
|
166
|
+
`createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
|
|
167
|
+
|
|
168
|
+
INDEX `document_expiry_warnings_tenantId_idx`(`tenantId`),
|
|
169
|
+
INDEX `document_expiry_warnings_documentId_idx`(`documentId`),
|
|
170
|
+
INDEX `document_expiry_warnings_expiresAt_idx`(`expiresAt`),
|
|
171
|
+
INDEX `document_expiry_warnings_resolved_idx`(`resolved`),
|
|
172
|
+
UNIQUE INDEX `document_expiry_warnings_documentId_daysUntil_key`(`documentId`, `daysUntil`),
|
|
173
|
+
PRIMARY KEY (`id`)
|
|
174
|
+
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
|
175
|
+
|
|
176
|
+
-- CreateIndex
|
|
177
|
+
CREATE INDEX `application_documents_isExpired_idx` ON `application_documents`(`isExpired`);
|
|
178
|
+
|
|
179
|
+
-- CreateIndex
|
|
180
|
+
CREATE INDEX `application_documents_expiresAt_idx` ON `application_documents`(`expiresAt`);
|
|
181
|
+
|
|
182
|
+
-- AddForeignKey
|
|
183
|
+
ALTER TABLE `bank_document_requirements` ADD CONSTRAINT `bank_document_requirements_tenantId_fkey` FOREIGN KEY (`tenantId`) REFERENCES `tenants`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
|
184
|
+
|
|
185
|
+
-- AddForeignKey
|
|
186
|
+
ALTER TABLE `bank_document_requirements` ADD CONSTRAINT `bank_document_requirements_organizationId_fkey` FOREIGN KEY (`organizationId`) REFERENCES `organizations`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
|
187
|
+
|
|
188
|
+
-- AddForeignKey
|
|
189
|
+
ALTER TABLE `bank_document_requirements` ADD CONSTRAINT `bank_document_requirements_paymentMethodId_fkey` FOREIGN KEY (`paymentMethodId`) REFERENCES `property_payment_methods`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;
|
|
190
|
+
|
|
191
|
+
-- AddForeignKey
|
|
192
|
+
ALTER TABLE `application_organizations` ADD CONSTRAINT `application_organizations_tenantId_fkey` FOREIGN KEY (`tenantId`) REFERENCES `tenants`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
|
193
|
+
|
|
194
|
+
-- AddForeignKey
|
|
195
|
+
ALTER TABLE `application_organizations` ADD CONSTRAINT `application_organizations_applicationId_fkey` FOREIGN KEY (`applicationId`) REFERENCES `applications`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
|
196
|
+
|
|
197
|
+
-- AddForeignKey
|
|
198
|
+
ALTER TABLE `application_organizations` ADD CONSTRAINT `application_organizations_organizationId_fkey` FOREIGN KEY (`organizationId`) REFERENCES `organizations`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
package/prisma/migrations/20260121161937_add_phase_step_order_unique_constraints/migration.sql
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Warnings:
|
|
3
|
+
|
|
4
|
+
- A unique constraint covering the columns `[phaseId,order]` on the table `payment_method_phase_steps` will be added. If there are existing duplicate values, this will fail.
|
|
5
|
+
- A unique constraint covering the columns `[paymentMethodId,order]` on the table `property_payment_method_phases` will be added. If there are existing duplicate values, this will fail.
|
|
6
|
+
|
|
7
|
+
*/
|
|
8
|
+
-- CreateIndex
|
|
9
|
+
CREATE UNIQUE INDEX `payment_method_phase_steps_phaseId_order_key` ON `payment_method_phase_steps`(`phaseId`, `order`);
|
|
10
|
+
|
|
11
|
+
-- CreateIndex
|
|
12
|
+
CREATE UNIQUE INDEX `property_payment_method_phases_paymentMethodId_order_key` ON `property_payment_method_phases`(`paymentMethodId`, `order`);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
-- DropForeignKey
|
|
2
|
+
ALTER TABLE `applications` DROP FOREIGN KEY `applications_propertyUnitId_fkey`;
|
|
3
|
+
|
|
4
|
+
-- AlterTable
|
|
5
|
+
ALTER TABLE `payment_installments` ADD COLUMN `version` INTEGER NOT NULL DEFAULT 0;
|
|
6
|
+
|
|
7
|
+
-- AlterTable
|
|
8
|
+
ALTER TABLE `payment_phases` ADD COLUMN `version` INTEGER NOT NULL DEFAULT 0;
|
|
9
|
+
|
|
10
|
+
-- AlterTable
|
|
11
|
+
ALTER TABLE `property_units` ADD COLUMN `version` INTEGER NOT NULL DEFAULT 0;
|
|
12
|
+
|
|
13
|
+
-- AddForeignKey
|
|
14
|
+
ALTER TABLE `applications` ADD CONSTRAINT `applications_propertyUnitId_fkey` FOREIGN KEY (`propertyUnitId`) REFERENCES `property_units`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|