@valentine-efagene/qshelter-common 2.0.22 → 2.0.25

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.
@@ -36,6 +36,7 @@ export type ContractSumAggregateOutputType = {
36
36
  };
37
37
  export type ContractMinAggregateOutputType = {
38
38
  id: string | null;
39
+ tenantId: string | null;
39
40
  propertyUnitId: string | null;
40
41
  buyerId: string | null;
41
42
  sellerId: string | null;
@@ -67,6 +68,7 @@ export type ContractMinAggregateOutputType = {
67
68
  };
68
69
  export type ContractMaxAggregateOutputType = {
69
70
  id: string | null;
71
+ tenantId: string | null;
70
72
  propertyUnitId: string | null;
71
73
  buyerId: string | null;
72
74
  sellerId: string | null;
@@ -98,6 +100,7 @@ export type ContractMaxAggregateOutputType = {
98
100
  };
99
101
  export type ContractCountAggregateOutputType = {
100
102
  id: number;
103
+ tenantId: number;
101
104
  propertyUnitId: number;
102
105
  buyerId: number;
103
106
  sellerId: number;
@@ -152,6 +155,7 @@ export type ContractSumAggregateInputType = {
152
155
  };
153
156
  export type ContractMinAggregateInputType = {
154
157
  id?: true;
158
+ tenantId?: true;
155
159
  propertyUnitId?: true;
156
160
  buyerId?: true;
157
161
  sellerId?: true;
@@ -183,6 +187,7 @@ export type ContractMinAggregateInputType = {
183
187
  };
184
188
  export type ContractMaxAggregateInputType = {
185
189
  id?: true;
190
+ tenantId?: true;
186
191
  propertyUnitId?: true;
187
192
  buyerId?: true;
188
193
  sellerId?: true;
@@ -214,6 +219,7 @@ export type ContractMaxAggregateInputType = {
214
219
  };
215
220
  export type ContractCountAggregateInputType = {
216
221
  id?: true;
222
+ tenantId?: true;
217
223
  propertyUnitId?: true;
218
224
  buyerId?: true;
219
225
  sellerId?: true;
@@ -322,6 +328,7 @@ export type ContractGroupByArgs<ExtArgs extends runtime.Types.Extensions.Interna
322
328
  };
323
329
  export type ContractGroupByOutputType = {
324
330
  id: string;
331
+ tenantId: string;
325
332
  propertyUnitId: string;
326
333
  buyerId: string;
327
334
  sellerId: string | null;
@@ -364,6 +371,7 @@ export type ContractWhereInput = {
364
371
  OR?: Prisma.ContractWhereInput[];
365
372
  NOT?: Prisma.ContractWhereInput | Prisma.ContractWhereInput[];
366
373
  id?: Prisma.StringFilter<"Contract"> | string;
374
+ tenantId?: Prisma.StringFilter<"Contract"> | string;
367
375
  propertyUnitId?: Prisma.StringFilter<"Contract"> | string;
368
376
  buyerId?: Prisma.StringFilter<"Contract"> | string;
369
377
  sellerId?: Prisma.StringNullableFilter<"Contract"> | string | null;
@@ -392,6 +400,7 @@ export type ContractWhereInput = {
392
400
  terminatedAt?: Prisma.DateTimeNullableFilter<"Contract"> | Date | string | null;
393
401
  createdAt?: Prisma.DateTimeFilter<"Contract"> | Date | string;
394
402
  updatedAt?: Prisma.DateTimeFilter<"Contract"> | Date | string;
403
+ tenant?: Prisma.XOR<Prisma.TenantScalarRelationFilter, Prisma.TenantWhereInput>;
395
404
  propertyUnit?: Prisma.XOR<Prisma.PropertyUnitScalarRelationFilter, Prisma.PropertyUnitWhereInput>;
396
405
  buyer?: Prisma.XOR<Prisma.UserScalarRelationFilter, Prisma.UserWhereInput>;
397
406
  seller?: Prisma.XOR<Prisma.UserNullableScalarRelationFilter, Prisma.UserWhereInput> | null;
@@ -404,6 +413,7 @@ export type ContractWhereInput = {
404
413
  };
405
414
  export type ContractOrderByWithRelationInput = {
406
415
  id?: Prisma.SortOrder;
416
+ tenantId?: Prisma.SortOrder;
407
417
  propertyUnitId?: Prisma.SortOrder;
408
418
  buyerId?: Prisma.SortOrder;
409
419
  sellerId?: Prisma.SortOrderInput | Prisma.SortOrder;
@@ -432,6 +442,7 @@ export type ContractOrderByWithRelationInput = {
432
442
  terminatedAt?: Prisma.SortOrderInput | Prisma.SortOrder;
433
443
  createdAt?: Prisma.SortOrder;
434
444
  updatedAt?: Prisma.SortOrder;
445
+ tenant?: Prisma.TenantOrderByWithRelationInput;
435
446
  propertyUnit?: Prisma.PropertyUnitOrderByWithRelationInput;
436
447
  buyer?: Prisma.UserOrderByWithRelationInput;
437
448
  seller?: Prisma.UserOrderByWithRelationInput;
@@ -449,6 +460,7 @@ export type ContractWhereUniqueInput = Prisma.AtLeast<{
449
460
  AND?: Prisma.ContractWhereInput | Prisma.ContractWhereInput[];
450
461
  OR?: Prisma.ContractWhereInput[];
451
462
  NOT?: Prisma.ContractWhereInput | Prisma.ContractWhereInput[];
463
+ tenantId?: Prisma.StringFilter<"Contract"> | string;
452
464
  propertyUnitId?: Prisma.StringFilter<"Contract"> | string;
453
465
  buyerId?: Prisma.StringFilter<"Contract"> | string;
454
466
  sellerId?: Prisma.StringNullableFilter<"Contract"> | string | null;
@@ -476,6 +488,7 @@ export type ContractWhereUniqueInput = Prisma.AtLeast<{
476
488
  terminatedAt?: Prisma.DateTimeNullableFilter<"Contract"> | Date | string | null;
477
489
  createdAt?: Prisma.DateTimeFilter<"Contract"> | Date | string;
478
490
  updatedAt?: Prisma.DateTimeFilter<"Contract"> | Date | string;
491
+ tenant?: Prisma.XOR<Prisma.TenantScalarRelationFilter, Prisma.TenantWhereInput>;
479
492
  propertyUnit?: Prisma.XOR<Prisma.PropertyUnitScalarRelationFilter, Prisma.PropertyUnitWhereInput>;
480
493
  buyer?: Prisma.XOR<Prisma.UserScalarRelationFilter, Prisma.UserWhereInput>;
481
494
  seller?: Prisma.XOR<Prisma.UserNullableScalarRelationFilter, Prisma.UserWhereInput> | null;
@@ -488,6 +501,7 @@ export type ContractWhereUniqueInput = Prisma.AtLeast<{
488
501
  }, "id" | "contractNumber">;
489
502
  export type ContractOrderByWithAggregationInput = {
490
503
  id?: Prisma.SortOrder;
504
+ tenantId?: Prisma.SortOrder;
491
505
  propertyUnitId?: Prisma.SortOrder;
492
506
  buyerId?: Prisma.SortOrder;
493
507
  sellerId?: Prisma.SortOrderInput | Prisma.SortOrder;
@@ -527,6 +541,7 @@ export type ContractScalarWhereWithAggregatesInput = {
527
541
  OR?: Prisma.ContractScalarWhereWithAggregatesInput[];
528
542
  NOT?: Prisma.ContractScalarWhereWithAggregatesInput | Prisma.ContractScalarWhereWithAggregatesInput[];
529
543
  id?: Prisma.StringWithAggregatesFilter<"Contract"> | string;
544
+ tenantId?: Prisma.StringWithAggregatesFilter<"Contract"> | string;
530
545
  propertyUnitId?: Prisma.StringWithAggregatesFilter<"Contract"> | string;
531
546
  buyerId?: Prisma.StringWithAggregatesFilter<"Contract"> | string;
532
547
  sellerId?: Prisma.StringNullableWithAggregatesFilter<"Contract"> | string | null;
@@ -582,6 +597,7 @@ export type ContractCreateInput = {
582
597
  terminatedAt?: Date | string | null;
583
598
  createdAt?: Date | string;
584
599
  updatedAt?: Date | string;
600
+ tenant: Prisma.TenantCreateNestedOneWithoutContractsInput;
585
601
  propertyUnit: Prisma.PropertyUnitCreateNestedOneWithoutContractsInput;
586
602
  buyer: Prisma.UserCreateNestedOneWithoutContractsInput;
587
603
  seller?: Prisma.UserCreateNestedOneWithoutSoldContractsInput;
@@ -594,6 +610,7 @@ export type ContractCreateInput = {
594
610
  };
595
611
  export type ContractUncheckedCreateInput = {
596
612
  id?: string;
613
+ tenantId: string;
597
614
  propertyUnitId: string;
598
615
  buyerId: string;
599
616
  sellerId?: string | null;
@@ -654,6 +671,7 @@ export type ContractUpdateInput = {
654
671
  terminatedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
655
672
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
656
673
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
674
+ tenant?: Prisma.TenantUpdateOneRequiredWithoutContractsNestedInput;
657
675
  propertyUnit?: Prisma.PropertyUnitUpdateOneRequiredWithoutContractsNestedInput;
658
676
  buyer?: Prisma.UserUpdateOneRequiredWithoutContractsNestedInput;
659
677
  seller?: Prisma.UserUpdateOneWithoutSoldContractsNestedInput;
@@ -666,6 +684,7 @@ export type ContractUpdateInput = {
666
684
  };
667
685
  export type ContractUncheckedUpdateInput = {
668
686
  id?: Prisma.StringFieldUpdateOperationsInput | string;
687
+ tenantId?: Prisma.StringFieldUpdateOperationsInput | string;
669
688
  propertyUnitId?: Prisma.StringFieldUpdateOperationsInput | string;
670
689
  buyerId?: Prisma.StringFieldUpdateOperationsInput | string;
671
690
  sellerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
@@ -702,6 +721,7 @@ export type ContractUncheckedUpdateInput = {
702
721
  };
703
722
  export type ContractCreateManyInput = {
704
723
  id?: string;
724
+ tenantId: string;
705
725
  propertyUnitId: string;
706
726
  buyerId: string;
707
727
  sellerId?: string | null;
@@ -760,6 +780,7 @@ export type ContractUpdateManyMutationInput = {
760
780
  };
761
781
  export type ContractUncheckedUpdateManyInput = {
762
782
  id?: Prisma.StringFieldUpdateOperationsInput | string;
783
+ tenantId?: Prisma.StringFieldUpdateOperationsInput | string;
763
784
  propertyUnitId?: Prisma.StringFieldUpdateOperationsInput | string;
764
785
  buyerId?: Prisma.StringFieldUpdateOperationsInput | string;
765
786
  sellerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
@@ -804,6 +825,7 @@ export type ContractOrderByRelevanceInput = {
804
825
  };
805
826
  export type ContractCountOrderByAggregateInput = {
806
827
  id?: Prisma.SortOrder;
828
+ tenantId?: Prisma.SortOrder;
807
829
  propertyUnitId?: Prisma.SortOrder;
808
830
  buyerId?: Prisma.SortOrder;
809
831
  sellerId?: Prisma.SortOrder;
@@ -846,6 +868,7 @@ export type ContractAvgOrderByAggregateInput = {
846
868
  };
847
869
  export type ContractMaxOrderByAggregateInput = {
848
870
  id?: Prisma.SortOrder;
871
+ tenantId?: Prisma.SortOrder;
849
872
  propertyUnitId?: Prisma.SortOrder;
850
873
  buyerId?: Prisma.SortOrder;
851
874
  sellerId?: Prisma.SortOrder;
@@ -877,6 +900,7 @@ export type ContractMaxOrderByAggregateInput = {
877
900
  };
878
901
  export type ContractMinOrderByAggregateInput = {
879
902
  id?: Prisma.SortOrder;
903
+ tenantId?: Prisma.SortOrder;
880
904
  propertyUnitId?: Prisma.SortOrder;
881
905
  buyerId?: Prisma.SortOrder;
882
906
  sellerId?: Prisma.SortOrder;
@@ -997,6 +1021,44 @@ export type ContractUncheckedUpdateManyWithoutSellerNestedInput = {
997
1021
  updateMany?: Prisma.ContractUpdateManyWithWhereWithoutSellerInput | Prisma.ContractUpdateManyWithWhereWithoutSellerInput[];
998
1022
  deleteMany?: Prisma.ContractScalarWhereInput | Prisma.ContractScalarWhereInput[];
999
1023
  };
1024
+ export type ContractCreateNestedManyWithoutTenantInput = {
1025
+ create?: Prisma.XOR<Prisma.ContractCreateWithoutTenantInput, Prisma.ContractUncheckedCreateWithoutTenantInput> | Prisma.ContractCreateWithoutTenantInput[] | Prisma.ContractUncheckedCreateWithoutTenantInput[];
1026
+ connectOrCreate?: Prisma.ContractCreateOrConnectWithoutTenantInput | Prisma.ContractCreateOrConnectWithoutTenantInput[];
1027
+ createMany?: Prisma.ContractCreateManyTenantInputEnvelope;
1028
+ connect?: Prisma.ContractWhereUniqueInput | Prisma.ContractWhereUniqueInput[];
1029
+ };
1030
+ export type ContractUncheckedCreateNestedManyWithoutTenantInput = {
1031
+ create?: Prisma.XOR<Prisma.ContractCreateWithoutTenantInput, Prisma.ContractUncheckedCreateWithoutTenantInput> | Prisma.ContractCreateWithoutTenantInput[] | Prisma.ContractUncheckedCreateWithoutTenantInput[];
1032
+ connectOrCreate?: Prisma.ContractCreateOrConnectWithoutTenantInput | Prisma.ContractCreateOrConnectWithoutTenantInput[];
1033
+ createMany?: Prisma.ContractCreateManyTenantInputEnvelope;
1034
+ connect?: Prisma.ContractWhereUniqueInput | Prisma.ContractWhereUniqueInput[];
1035
+ };
1036
+ export type ContractUpdateManyWithoutTenantNestedInput = {
1037
+ create?: Prisma.XOR<Prisma.ContractCreateWithoutTenantInput, Prisma.ContractUncheckedCreateWithoutTenantInput> | Prisma.ContractCreateWithoutTenantInput[] | Prisma.ContractUncheckedCreateWithoutTenantInput[];
1038
+ connectOrCreate?: Prisma.ContractCreateOrConnectWithoutTenantInput | Prisma.ContractCreateOrConnectWithoutTenantInput[];
1039
+ upsert?: Prisma.ContractUpsertWithWhereUniqueWithoutTenantInput | Prisma.ContractUpsertWithWhereUniqueWithoutTenantInput[];
1040
+ createMany?: Prisma.ContractCreateManyTenantInputEnvelope;
1041
+ set?: Prisma.ContractWhereUniqueInput | Prisma.ContractWhereUniqueInput[];
1042
+ disconnect?: Prisma.ContractWhereUniqueInput | Prisma.ContractWhereUniqueInput[];
1043
+ delete?: Prisma.ContractWhereUniqueInput | Prisma.ContractWhereUniqueInput[];
1044
+ connect?: Prisma.ContractWhereUniqueInput | Prisma.ContractWhereUniqueInput[];
1045
+ update?: Prisma.ContractUpdateWithWhereUniqueWithoutTenantInput | Prisma.ContractUpdateWithWhereUniqueWithoutTenantInput[];
1046
+ updateMany?: Prisma.ContractUpdateManyWithWhereWithoutTenantInput | Prisma.ContractUpdateManyWithWhereWithoutTenantInput[];
1047
+ deleteMany?: Prisma.ContractScalarWhereInput | Prisma.ContractScalarWhereInput[];
1048
+ };
1049
+ export type ContractUncheckedUpdateManyWithoutTenantNestedInput = {
1050
+ create?: Prisma.XOR<Prisma.ContractCreateWithoutTenantInput, Prisma.ContractUncheckedCreateWithoutTenantInput> | Prisma.ContractCreateWithoutTenantInput[] | Prisma.ContractUncheckedCreateWithoutTenantInput[];
1051
+ connectOrCreate?: Prisma.ContractCreateOrConnectWithoutTenantInput | Prisma.ContractCreateOrConnectWithoutTenantInput[];
1052
+ upsert?: Prisma.ContractUpsertWithWhereUniqueWithoutTenantInput | Prisma.ContractUpsertWithWhereUniqueWithoutTenantInput[];
1053
+ createMany?: Prisma.ContractCreateManyTenantInputEnvelope;
1054
+ set?: Prisma.ContractWhereUniqueInput | Prisma.ContractWhereUniqueInput[];
1055
+ disconnect?: Prisma.ContractWhereUniqueInput | Prisma.ContractWhereUniqueInput[];
1056
+ delete?: Prisma.ContractWhereUniqueInput | Prisma.ContractWhereUniqueInput[];
1057
+ connect?: Prisma.ContractWhereUniqueInput | Prisma.ContractWhereUniqueInput[];
1058
+ update?: Prisma.ContractUpdateWithWhereUniqueWithoutTenantInput | Prisma.ContractUpdateWithWhereUniqueWithoutTenantInput[];
1059
+ updateMany?: Prisma.ContractUpdateManyWithWhereWithoutTenantInput | Prisma.ContractUpdateManyWithWhereWithoutTenantInput[];
1060
+ deleteMany?: Prisma.ContractScalarWhereInput | Prisma.ContractScalarWhereInput[];
1061
+ };
1000
1062
  export type ContractCreateNestedManyWithoutPropertyUnitInput = {
1001
1063
  create?: Prisma.XOR<Prisma.ContractCreateWithoutPropertyUnitInput, Prisma.ContractUncheckedCreateWithoutPropertyUnitInput> | Prisma.ContractCreateWithoutPropertyUnitInput[] | Prisma.ContractUncheckedCreateWithoutPropertyUnitInput[];
1002
1064
  connectOrCreate?: Prisma.ContractCreateOrConnectWithoutPropertyUnitInput | Prisma.ContractCreateOrConnectWithoutPropertyUnitInput[];
@@ -1159,6 +1221,7 @@ export type ContractCreateWithoutBuyerInput = {
1159
1221
  terminatedAt?: Date | string | null;
1160
1222
  createdAt?: Date | string;
1161
1223
  updatedAt?: Date | string;
1224
+ tenant: Prisma.TenantCreateNestedOneWithoutContractsInput;
1162
1225
  propertyUnit: Prisma.PropertyUnitCreateNestedOneWithoutContractsInput;
1163
1226
  seller?: Prisma.UserCreateNestedOneWithoutSoldContractsInput;
1164
1227
  paymentMethod?: Prisma.PropertyPaymentMethodCreateNestedOneWithoutContractsInput;
@@ -1170,6 +1233,7 @@ export type ContractCreateWithoutBuyerInput = {
1170
1233
  };
1171
1234
  export type ContractUncheckedCreateWithoutBuyerInput = {
1172
1235
  id?: string;
1236
+ tenantId: string;
1173
1237
  propertyUnitId: string;
1174
1238
  sellerId?: string | null;
1175
1239
  paymentMethodId?: string | null;
@@ -1237,6 +1301,7 @@ export type ContractCreateWithoutSellerInput = {
1237
1301
  terminatedAt?: Date | string | null;
1238
1302
  createdAt?: Date | string;
1239
1303
  updatedAt?: Date | string;
1304
+ tenant: Prisma.TenantCreateNestedOneWithoutContractsInput;
1240
1305
  propertyUnit: Prisma.PropertyUnitCreateNestedOneWithoutContractsInput;
1241
1306
  buyer: Prisma.UserCreateNestedOneWithoutContractsInput;
1242
1307
  paymentMethod?: Prisma.PropertyPaymentMethodCreateNestedOneWithoutContractsInput;
@@ -1248,6 +1313,7 @@ export type ContractCreateWithoutSellerInput = {
1248
1313
  };
1249
1314
  export type ContractUncheckedCreateWithoutSellerInput = {
1250
1315
  id?: string;
1316
+ tenantId: string;
1251
1317
  propertyUnitId: string;
1252
1318
  buyerId: string;
1253
1319
  paymentMethodId?: string | null;
@@ -1307,6 +1373,7 @@ export type ContractScalarWhereInput = {
1307
1373
  OR?: Prisma.ContractScalarWhereInput[];
1308
1374
  NOT?: Prisma.ContractScalarWhereInput | Prisma.ContractScalarWhereInput[];
1309
1375
  id?: Prisma.StringFilter<"Contract"> | string;
1376
+ tenantId?: Prisma.StringFilter<"Contract"> | string;
1310
1377
  propertyUnitId?: Prisma.StringFilter<"Contract"> | string;
1311
1378
  buyerId?: Prisma.StringFilter<"Contract"> | string;
1312
1379
  sellerId?: Prisma.StringNullableFilter<"Contract"> | string | null;
@@ -1349,6 +1416,99 @@ export type ContractUpdateManyWithWhereWithoutSellerInput = {
1349
1416
  where: Prisma.ContractScalarWhereInput;
1350
1417
  data: Prisma.XOR<Prisma.ContractUpdateManyMutationInput, Prisma.ContractUncheckedUpdateManyWithoutSellerInput>;
1351
1418
  };
1419
+ export type ContractCreateWithoutTenantInput = {
1420
+ id?: string;
1421
+ contractNumber: string;
1422
+ title: string;
1423
+ description?: string | null;
1424
+ contractType: string;
1425
+ totalAmount: number;
1426
+ downPayment?: number;
1427
+ downPaymentPaid?: number;
1428
+ principal?: number | null;
1429
+ interestRate?: number | null;
1430
+ termMonths?: number | null;
1431
+ periodicPayment?: number | null;
1432
+ totalPaidToDate?: number;
1433
+ totalInterestPaid?: number;
1434
+ status?: string;
1435
+ state?: string;
1436
+ currentPhaseId?: string | null;
1437
+ nextPaymentDueDate?: Date | string | null;
1438
+ lastReminderSentAt?: Date | string | null;
1439
+ startDate?: Date | string | null;
1440
+ endDate?: Date | string | null;
1441
+ signedAt?: Date | string | null;
1442
+ terminatedAt?: Date | string | null;
1443
+ createdAt?: Date | string;
1444
+ updatedAt?: Date | string;
1445
+ propertyUnit: Prisma.PropertyUnitCreateNestedOneWithoutContractsInput;
1446
+ buyer: Prisma.UserCreateNestedOneWithoutContractsInput;
1447
+ seller?: Prisma.UserCreateNestedOneWithoutSoldContractsInput;
1448
+ paymentMethod?: Prisma.PropertyPaymentMethodCreateNestedOneWithoutContractsInput;
1449
+ phases?: Prisma.ContractPhaseCreateNestedManyWithoutContractInput;
1450
+ documents?: Prisma.ContractDocumentCreateNestedManyWithoutContractInput;
1451
+ payments?: Prisma.ContractPaymentCreateNestedManyWithoutContractInput;
1452
+ transitions?: Prisma.ContractTransitionCreateNestedManyWithoutContractInput;
1453
+ events?: Prisma.ContractEventCreateNestedManyWithoutContractInput;
1454
+ };
1455
+ export type ContractUncheckedCreateWithoutTenantInput = {
1456
+ id?: string;
1457
+ propertyUnitId: string;
1458
+ buyerId: string;
1459
+ sellerId?: string | null;
1460
+ paymentMethodId?: string | null;
1461
+ contractNumber: string;
1462
+ title: string;
1463
+ description?: string | null;
1464
+ contractType: string;
1465
+ totalAmount: number;
1466
+ downPayment?: number;
1467
+ downPaymentPaid?: number;
1468
+ principal?: number | null;
1469
+ interestRate?: number | null;
1470
+ termMonths?: number | null;
1471
+ periodicPayment?: number | null;
1472
+ totalPaidToDate?: number;
1473
+ totalInterestPaid?: number;
1474
+ status?: string;
1475
+ state?: string;
1476
+ currentPhaseId?: string | null;
1477
+ nextPaymentDueDate?: Date | string | null;
1478
+ lastReminderSentAt?: Date | string | null;
1479
+ startDate?: Date | string | null;
1480
+ endDate?: Date | string | null;
1481
+ signedAt?: Date | string | null;
1482
+ terminatedAt?: Date | string | null;
1483
+ createdAt?: Date | string;
1484
+ updatedAt?: Date | string;
1485
+ phases?: Prisma.ContractPhaseUncheckedCreateNestedManyWithoutContractInput;
1486
+ documents?: Prisma.ContractDocumentUncheckedCreateNestedManyWithoutContractInput;
1487
+ payments?: Prisma.ContractPaymentUncheckedCreateNestedManyWithoutContractInput;
1488
+ transitions?: Prisma.ContractTransitionUncheckedCreateNestedManyWithoutContractInput;
1489
+ events?: Prisma.ContractEventUncheckedCreateNestedManyWithoutContractInput;
1490
+ };
1491
+ export type ContractCreateOrConnectWithoutTenantInput = {
1492
+ where: Prisma.ContractWhereUniqueInput;
1493
+ create: Prisma.XOR<Prisma.ContractCreateWithoutTenantInput, Prisma.ContractUncheckedCreateWithoutTenantInput>;
1494
+ };
1495
+ export type ContractCreateManyTenantInputEnvelope = {
1496
+ data: Prisma.ContractCreateManyTenantInput | Prisma.ContractCreateManyTenantInput[];
1497
+ skipDuplicates?: boolean;
1498
+ };
1499
+ export type ContractUpsertWithWhereUniqueWithoutTenantInput = {
1500
+ where: Prisma.ContractWhereUniqueInput;
1501
+ update: Prisma.XOR<Prisma.ContractUpdateWithoutTenantInput, Prisma.ContractUncheckedUpdateWithoutTenantInput>;
1502
+ create: Prisma.XOR<Prisma.ContractCreateWithoutTenantInput, Prisma.ContractUncheckedCreateWithoutTenantInput>;
1503
+ };
1504
+ export type ContractUpdateWithWhereUniqueWithoutTenantInput = {
1505
+ where: Prisma.ContractWhereUniqueInput;
1506
+ data: Prisma.XOR<Prisma.ContractUpdateWithoutTenantInput, Prisma.ContractUncheckedUpdateWithoutTenantInput>;
1507
+ };
1508
+ export type ContractUpdateManyWithWhereWithoutTenantInput = {
1509
+ where: Prisma.ContractScalarWhereInput;
1510
+ data: Prisma.XOR<Prisma.ContractUpdateManyMutationInput, Prisma.ContractUncheckedUpdateManyWithoutTenantInput>;
1511
+ };
1352
1512
  export type ContractCreateWithoutPropertyUnitInput = {
1353
1513
  id?: string;
1354
1514
  contractNumber: string;
@@ -1375,6 +1535,7 @@ export type ContractCreateWithoutPropertyUnitInput = {
1375
1535
  terminatedAt?: Date | string | null;
1376
1536
  createdAt?: Date | string;
1377
1537
  updatedAt?: Date | string;
1538
+ tenant: Prisma.TenantCreateNestedOneWithoutContractsInput;
1378
1539
  buyer: Prisma.UserCreateNestedOneWithoutContractsInput;
1379
1540
  seller?: Prisma.UserCreateNestedOneWithoutSoldContractsInput;
1380
1541
  paymentMethod?: Prisma.PropertyPaymentMethodCreateNestedOneWithoutContractsInput;
@@ -1386,6 +1547,7 @@ export type ContractCreateWithoutPropertyUnitInput = {
1386
1547
  };
1387
1548
  export type ContractUncheckedCreateWithoutPropertyUnitInput = {
1388
1549
  id?: string;
1550
+ tenantId: string;
1389
1551
  buyerId: string;
1390
1552
  sellerId?: string | null;
1391
1553
  paymentMethodId?: string | null;
@@ -1466,6 +1628,7 @@ export type ContractCreateWithoutPaymentMethodInput = {
1466
1628
  terminatedAt?: Date | string | null;
1467
1629
  createdAt?: Date | string;
1468
1630
  updatedAt?: Date | string;
1631
+ tenant: Prisma.TenantCreateNestedOneWithoutContractsInput;
1469
1632
  propertyUnit: Prisma.PropertyUnitCreateNestedOneWithoutContractsInput;
1470
1633
  buyer: Prisma.UserCreateNestedOneWithoutContractsInput;
1471
1634
  seller?: Prisma.UserCreateNestedOneWithoutSoldContractsInput;
@@ -1477,6 +1640,7 @@ export type ContractCreateWithoutPaymentMethodInput = {
1477
1640
  };
1478
1641
  export type ContractUncheckedCreateWithoutPaymentMethodInput = {
1479
1642
  id?: string;
1643
+ tenantId: string;
1480
1644
  propertyUnitId: string;
1481
1645
  buyerId: string;
1482
1646
  sellerId?: string | null;
@@ -1557,6 +1721,7 @@ export type ContractCreateWithoutPhasesInput = {
1557
1721
  terminatedAt?: Date | string | null;
1558
1722
  createdAt?: Date | string;
1559
1723
  updatedAt?: Date | string;
1724
+ tenant: Prisma.TenantCreateNestedOneWithoutContractsInput;
1560
1725
  propertyUnit: Prisma.PropertyUnitCreateNestedOneWithoutContractsInput;
1561
1726
  buyer: Prisma.UserCreateNestedOneWithoutContractsInput;
1562
1727
  seller?: Prisma.UserCreateNestedOneWithoutSoldContractsInput;
@@ -1568,6 +1733,7 @@ export type ContractCreateWithoutPhasesInput = {
1568
1733
  };
1569
1734
  export type ContractUncheckedCreateWithoutPhasesInput = {
1570
1735
  id?: string;
1736
+ tenantId: string;
1571
1737
  propertyUnitId: string;
1572
1738
  buyerId: string;
1573
1739
  sellerId?: string | null;
@@ -1640,6 +1806,7 @@ export type ContractUpdateWithoutPhasesInput = {
1640
1806
  terminatedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1641
1807
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
1642
1808
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
1809
+ tenant?: Prisma.TenantUpdateOneRequiredWithoutContractsNestedInput;
1643
1810
  propertyUnit?: Prisma.PropertyUnitUpdateOneRequiredWithoutContractsNestedInput;
1644
1811
  buyer?: Prisma.UserUpdateOneRequiredWithoutContractsNestedInput;
1645
1812
  seller?: Prisma.UserUpdateOneWithoutSoldContractsNestedInput;
@@ -1651,6 +1818,7 @@ export type ContractUpdateWithoutPhasesInput = {
1651
1818
  };
1652
1819
  export type ContractUncheckedUpdateWithoutPhasesInput = {
1653
1820
  id?: Prisma.StringFieldUpdateOperationsInput | string;
1821
+ tenantId?: Prisma.StringFieldUpdateOperationsInput | string;
1654
1822
  propertyUnitId?: Prisma.StringFieldUpdateOperationsInput | string;
1655
1823
  buyerId?: Prisma.StringFieldUpdateOperationsInput | string;
1656
1824
  sellerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
@@ -1710,6 +1878,7 @@ export type ContractCreateWithoutPaymentsInput = {
1710
1878
  terminatedAt?: Date | string | null;
1711
1879
  createdAt?: Date | string;
1712
1880
  updatedAt?: Date | string;
1881
+ tenant: Prisma.TenantCreateNestedOneWithoutContractsInput;
1713
1882
  propertyUnit: Prisma.PropertyUnitCreateNestedOneWithoutContractsInput;
1714
1883
  buyer: Prisma.UserCreateNestedOneWithoutContractsInput;
1715
1884
  seller?: Prisma.UserCreateNestedOneWithoutSoldContractsInput;
@@ -1721,6 +1890,7 @@ export type ContractCreateWithoutPaymentsInput = {
1721
1890
  };
1722
1891
  export type ContractUncheckedCreateWithoutPaymentsInput = {
1723
1892
  id?: string;
1893
+ tenantId: string;
1724
1894
  propertyUnitId: string;
1725
1895
  buyerId: string;
1726
1896
  sellerId?: string | null;
@@ -1793,6 +1963,7 @@ export type ContractUpdateWithoutPaymentsInput = {
1793
1963
  terminatedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1794
1964
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
1795
1965
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
1966
+ tenant?: Prisma.TenantUpdateOneRequiredWithoutContractsNestedInput;
1796
1967
  propertyUnit?: Prisma.PropertyUnitUpdateOneRequiredWithoutContractsNestedInput;
1797
1968
  buyer?: Prisma.UserUpdateOneRequiredWithoutContractsNestedInput;
1798
1969
  seller?: Prisma.UserUpdateOneWithoutSoldContractsNestedInput;
@@ -1804,6 +1975,7 @@ export type ContractUpdateWithoutPaymentsInput = {
1804
1975
  };
1805
1976
  export type ContractUncheckedUpdateWithoutPaymentsInput = {
1806
1977
  id?: Prisma.StringFieldUpdateOperationsInput | string;
1978
+ tenantId?: Prisma.StringFieldUpdateOperationsInput | string;
1807
1979
  propertyUnitId?: Prisma.StringFieldUpdateOperationsInput | string;
1808
1980
  buyerId?: Prisma.StringFieldUpdateOperationsInput | string;
1809
1981
  sellerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
@@ -1863,6 +2035,7 @@ export type ContractCreateWithoutDocumentsInput = {
1863
2035
  terminatedAt?: Date | string | null;
1864
2036
  createdAt?: Date | string;
1865
2037
  updatedAt?: Date | string;
2038
+ tenant: Prisma.TenantCreateNestedOneWithoutContractsInput;
1866
2039
  propertyUnit: Prisma.PropertyUnitCreateNestedOneWithoutContractsInput;
1867
2040
  buyer: Prisma.UserCreateNestedOneWithoutContractsInput;
1868
2041
  seller?: Prisma.UserCreateNestedOneWithoutSoldContractsInput;
@@ -1874,6 +2047,7 @@ export type ContractCreateWithoutDocumentsInput = {
1874
2047
  };
1875
2048
  export type ContractUncheckedCreateWithoutDocumentsInput = {
1876
2049
  id?: string;
2050
+ tenantId: string;
1877
2051
  propertyUnitId: string;
1878
2052
  buyerId: string;
1879
2053
  sellerId?: string | null;
@@ -1946,6 +2120,7 @@ export type ContractUpdateWithoutDocumentsInput = {
1946
2120
  terminatedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1947
2121
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
1948
2122
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
2123
+ tenant?: Prisma.TenantUpdateOneRequiredWithoutContractsNestedInput;
1949
2124
  propertyUnit?: Prisma.PropertyUnitUpdateOneRequiredWithoutContractsNestedInput;
1950
2125
  buyer?: Prisma.UserUpdateOneRequiredWithoutContractsNestedInput;
1951
2126
  seller?: Prisma.UserUpdateOneWithoutSoldContractsNestedInput;
@@ -1957,6 +2132,7 @@ export type ContractUpdateWithoutDocumentsInput = {
1957
2132
  };
1958
2133
  export type ContractUncheckedUpdateWithoutDocumentsInput = {
1959
2134
  id?: Prisma.StringFieldUpdateOperationsInput | string;
2135
+ tenantId?: Prisma.StringFieldUpdateOperationsInput | string;
1960
2136
  propertyUnitId?: Prisma.StringFieldUpdateOperationsInput | string;
1961
2137
  buyerId?: Prisma.StringFieldUpdateOperationsInput | string;
1962
2138
  sellerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
@@ -2016,6 +2192,7 @@ export type ContractCreateWithoutTransitionsInput = {
2016
2192
  terminatedAt?: Date | string | null;
2017
2193
  createdAt?: Date | string;
2018
2194
  updatedAt?: Date | string;
2195
+ tenant: Prisma.TenantCreateNestedOneWithoutContractsInput;
2019
2196
  propertyUnit: Prisma.PropertyUnitCreateNestedOneWithoutContractsInput;
2020
2197
  buyer: Prisma.UserCreateNestedOneWithoutContractsInput;
2021
2198
  seller?: Prisma.UserCreateNestedOneWithoutSoldContractsInput;
@@ -2027,6 +2204,7 @@ export type ContractCreateWithoutTransitionsInput = {
2027
2204
  };
2028
2205
  export type ContractUncheckedCreateWithoutTransitionsInput = {
2029
2206
  id?: string;
2207
+ tenantId: string;
2030
2208
  propertyUnitId: string;
2031
2209
  buyerId: string;
2032
2210
  sellerId?: string | null;
@@ -2099,6 +2277,7 @@ export type ContractUpdateWithoutTransitionsInput = {
2099
2277
  terminatedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
2100
2278
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
2101
2279
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
2280
+ tenant?: Prisma.TenantUpdateOneRequiredWithoutContractsNestedInput;
2102
2281
  propertyUnit?: Prisma.PropertyUnitUpdateOneRequiredWithoutContractsNestedInput;
2103
2282
  buyer?: Prisma.UserUpdateOneRequiredWithoutContractsNestedInput;
2104
2283
  seller?: Prisma.UserUpdateOneWithoutSoldContractsNestedInput;
@@ -2110,6 +2289,7 @@ export type ContractUpdateWithoutTransitionsInput = {
2110
2289
  };
2111
2290
  export type ContractUncheckedUpdateWithoutTransitionsInput = {
2112
2291
  id?: Prisma.StringFieldUpdateOperationsInput | string;
2292
+ tenantId?: Prisma.StringFieldUpdateOperationsInput | string;
2113
2293
  propertyUnitId?: Prisma.StringFieldUpdateOperationsInput | string;
2114
2294
  buyerId?: Prisma.StringFieldUpdateOperationsInput | string;
2115
2295
  sellerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
@@ -2169,6 +2349,7 @@ export type ContractCreateWithoutEventsInput = {
2169
2349
  terminatedAt?: Date | string | null;
2170
2350
  createdAt?: Date | string;
2171
2351
  updatedAt?: Date | string;
2352
+ tenant: Prisma.TenantCreateNestedOneWithoutContractsInput;
2172
2353
  propertyUnit: Prisma.PropertyUnitCreateNestedOneWithoutContractsInput;
2173
2354
  buyer: Prisma.UserCreateNestedOneWithoutContractsInput;
2174
2355
  seller?: Prisma.UserCreateNestedOneWithoutSoldContractsInput;
@@ -2180,6 +2361,7 @@ export type ContractCreateWithoutEventsInput = {
2180
2361
  };
2181
2362
  export type ContractUncheckedCreateWithoutEventsInput = {
2182
2363
  id?: string;
2364
+ tenantId: string;
2183
2365
  propertyUnitId: string;
2184
2366
  buyerId: string;
2185
2367
  sellerId?: string | null;
@@ -2252,6 +2434,7 @@ export type ContractUpdateWithoutEventsInput = {
2252
2434
  terminatedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
2253
2435
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
2254
2436
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
2437
+ tenant?: Prisma.TenantUpdateOneRequiredWithoutContractsNestedInput;
2255
2438
  propertyUnit?: Prisma.PropertyUnitUpdateOneRequiredWithoutContractsNestedInput;
2256
2439
  buyer?: Prisma.UserUpdateOneRequiredWithoutContractsNestedInput;
2257
2440
  seller?: Prisma.UserUpdateOneWithoutSoldContractsNestedInput;
@@ -2263,6 +2446,7 @@ export type ContractUpdateWithoutEventsInput = {
2263
2446
  };
2264
2447
  export type ContractUncheckedUpdateWithoutEventsInput = {
2265
2448
  id?: Prisma.StringFieldUpdateOperationsInput | string;
2449
+ tenantId?: Prisma.StringFieldUpdateOperationsInput | string;
2266
2450
  propertyUnitId?: Prisma.StringFieldUpdateOperationsInput | string;
2267
2451
  buyerId?: Prisma.StringFieldUpdateOperationsInput | string;
2268
2452
  sellerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
@@ -2298,6 +2482,7 @@ export type ContractUncheckedUpdateWithoutEventsInput = {
2298
2482
  };
2299
2483
  export type ContractCreateManyBuyerInput = {
2300
2484
  id?: string;
2485
+ tenantId: string;
2301
2486
  propertyUnitId: string;
2302
2487
  sellerId?: string | null;
2303
2488
  paymentMethodId?: string | null;
@@ -2328,6 +2513,7 @@ export type ContractCreateManyBuyerInput = {
2328
2513
  };
2329
2514
  export type ContractCreateManySellerInput = {
2330
2515
  id?: string;
2516
+ tenantId: string;
2331
2517
  propertyUnitId: string;
2332
2518
  buyerId: string;
2333
2519
  paymentMethodId?: string | null;
@@ -2382,6 +2568,7 @@ export type ContractUpdateWithoutBuyerInput = {
2382
2568
  terminatedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
2383
2569
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
2384
2570
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
2571
+ tenant?: Prisma.TenantUpdateOneRequiredWithoutContractsNestedInput;
2385
2572
  propertyUnit?: Prisma.PropertyUnitUpdateOneRequiredWithoutContractsNestedInput;
2386
2573
  seller?: Prisma.UserUpdateOneWithoutSoldContractsNestedInput;
2387
2574
  paymentMethod?: Prisma.PropertyPaymentMethodUpdateOneWithoutContractsNestedInput;
@@ -2393,6 +2580,7 @@ export type ContractUpdateWithoutBuyerInput = {
2393
2580
  };
2394
2581
  export type ContractUncheckedUpdateWithoutBuyerInput = {
2395
2582
  id?: Prisma.StringFieldUpdateOperationsInput | string;
2583
+ tenantId?: Prisma.StringFieldUpdateOperationsInput | string;
2396
2584
  propertyUnitId?: Prisma.StringFieldUpdateOperationsInput | string;
2397
2585
  sellerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
2398
2586
  paymentMethodId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
@@ -2428,6 +2616,7 @@ export type ContractUncheckedUpdateWithoutBuyerInput = {
2428
2616
  };
2429
2617
  export type ContractUncheckedUpdateManyWithoutBuyerInput = {
2430
2618
  id?: Prisma.StringFieldUpdateOperationsInput | string;
2619
+ tenantId?: Prisma.StringFieldUpdateOperationsInput | string;
2431
2620
  propertyUnitId?: Prisma.StringFieldUpdateOperationsInput | string;
2432
2621
  sellerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
2433
2622
  paymentMethodId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
@@ -2482,6 +2671,7 @@ export type ContractUpdateWithoutSellerInput = {
2482
2671
  terminatedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
2483
2672
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
2484
2673
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
2674
+ tenant?: Prisma.TenantUpdateOneRequiredWithoutContractsNestedInput;
2485
2675
  propertyUnit?: Prisma.PropertyUnitUpdateOneRequiredWithoutContractsNestedInput;
2486
2676
  buyer?: Prisma.UserUpdateOneRequiredWithoutContractsNestedInput;
2487
2677
  paymentMethod?: Prisma.PropertyPaymentMethodUpdateOneWithoutContractsNestedInput;
@@ -2493,6 +2683,7 @@ export type ContractUpdateWithoutSellerInput = {
2493
2683
  };
2494
2684
  export type ContractUncheckedUpdateWithoutSellerInput = {
2495
2685
  id?: Prisma.StringFieldUpdateOperationsInput | string;
2686
+ tenantId?: Prisma.StringFieldUpdateOperationsInput | string;
2496
2687
  propertyUnitId?: Prisma.StringFieldUpdateOperationsInput | string;
2497
2688
  buyerId?: Prisma.StringFieldUpdateOperationsInput | string;
2498
2689
  paymentMethodId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
@@ -2527,9 +2718,144 @@ export type ContractUncheckedUpdateWithoutSellerInput = {
2527
2718
  events?: Prisma.ContractEventUncheckedUpdateManyWithoutContractNestedInput;
2528
2719
  };
2529
2720
  export type ContractUncheckedUpdateManyWithoutSellerInput = {
2721
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
2722
+ tenantId?: Prisma.StringFieldUpdateOperationsInput | string;
2723
+ propertyUnitId?: Prisma.StringFieldUpdateOperationsInput | string;
2724
+ buyerId?: Prisma.StringFieldUpdateOperationsInput | string;
2725
+ paymentMethodId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
2726
+ contractNumber?: Prisma.StringFieldUpdateOperationsInput | string;
2727
+ title?: Prisma.StringFieldUpdateOperationsInput | string;
2728
+ description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
2729
+ contractType?: Prisma.StringFieldUpdateOperationsInput | string;
2730
+ totalAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
2731
+ downPayment?: Prisma.FloatFieldUpdateOperationsInput | number;
2732
+ downPaymentPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
2733
+ principal?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
2734
+ interestRate?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
2735
+ termMonths?: Prisma.NullableIntFieldUpdateOperationsInput | number | null;
2736
+ periodicPayment?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
2737
+ totalPaidToDate?: Prisma.FloatFieldUpdateOperationsInput | number;
2738
+ totalInterestPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
2739
+ status?: Prisma.StringFieldUpdateOperationsInput | string;
2740
+ state?: Prisma.StringFieldUpdateOperationsInput | string;
2741
+ currentPhaseId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
2742
+ nextPaymentDueDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
2743
+ lastReminderSentAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
2744
+ startDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
2745
+ endDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
2746
+ signedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
2747
+ terminatedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
2748
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
2749
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
2750
+ };
2751
+ export type ContractCreateManyTenantInput = {
2752
+ id?: string;
2753
+ propertyUnitId: string;
2754
+ buyerId: string;
2755
+ sellerId?: string | null;
2756
+ paymentMethodId?: string | null;
2757
+ contractNumber: string;
2758
+ title: string;
2759
+ description?: string | null;
2760
+ contractType: string;
2761
+ totalAmount: number;
2762
+ downPayment?: number;
2763
+ downPaymentPaid?: number;
2764
+ principal?: number | null;
2765
+ interestRate?: number | null;
2766
+ termMonths?: number | null;
2767
+ periodicPayment?: number | null;
2768
+ totalPaidToDate?: number;
2769
+ totalInterestPaid?: number;
2770
+ status?: string;
2771
+ state?: string;
2772
+ currentPhaseId?: string | null;
2773
+ nextPaymentDueDate?: Date | string | null;
2774
+ lastReminderSentAt?: Date | string | null;
2775
+ startDate?: Date | string | null;
2776
+ endDate?: Date | string | null;
2777
+ signedAt?: Date | string | null;
2778
+ terminatedAt?: Date | string | null;
2779
+ createdAt?: Date | string;
2780
+ updatedAt?: Date | string;
2781
+ };
2782
+ export type ContractUpdateWithoutTenantInput = {
2783
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
2784
+ contractNumber?: Prisma.StringFieldUpdateOperationsInput | string;
2785
+ title?: Prisma.StringFieldUpdateOperationsInput | string;
2786
+ description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
2787
+ contractType?: Prisma.StringFieldUpdateOperationsInput | string;
2788
+ totalAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
2789
+ downPayment?: Prisma.FloatFieldUpdateOperationsInput | number;
2790
+ downPaymentPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
2791
+ principal?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
2792
+ interestRate?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
2793
+ termMonths?: Prisma.NullableIntFieldUpdateOperationsInput | number | null;
2794
+ periodicPayment?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
2795
+ totalPaidToDate?: Prisma.FloatFieldUpdateOperationsInput | number;
2796
+ totalInterestPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
2797
+ status?: Prisma.StringFieldUpdateOperationsInput | string;
2798
+ state?: Prisma.StringFieldUpdateOperationsInput | string;
2799
+ currentPhaseId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
2800
+ nextPaymentDueDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
2801
+ lastReminderSentAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
2802
+ startDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
2803
+ endDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
2804
+ signedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
2805
+ terminatedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
2806
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
2807
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
2808
+ propertyUnit?: Prisma.PropertyUnitUpdateOneRequiredWithoutContractsNestedInput;
2809
+ buyer?: Prisma.UserUpdateOneRequiredWithoutContractsNestedInput;
2810
+ seller?: Prisma.UserUpdateOneWithoutSoldContractsNestedInput;
2811
+ paymentMethod?: Prisma.PropertyPaymentMethodUpdateOneWithoutContractsNestedInput;
2812
+ phases?: Prisma.ContractPhaseUpdateManyWithoutContractNestedInput;
2813
+ documents?: Prisma.ContractDocumentUpdateManyWithoutContractNestedInput;
2814
+ payments?: Prisma.ContractPaymentUpdateManyWithoutContractNestedInput;
2815
+ transitions?: Prisma.ContractTransitionUpdateManyWithoutContractNestedInput;
2816
+ events?: Prisma.ContractEventUpdateManyWithoutContractNestedInput;
2817
+ };
2818
+ export type ContractUncheckedUpdateWithoutTenantInput = {
2819
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
2820
+ propertyUnitId?: Prisma.StringFieldUpdateOperationsInput | string;
2821
+ buyerId?: Prisma.StringFieldUpdateOperationsInput | string;
2822
+ sellerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
2823
+ paymentMethodId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
2824
+ contractNumber?: Prisma.StringFieldUpdateOperationsInput | string;
2825
+ title?: Prisma.StringFieldUpdateOperationsInput | string;
2826
+ description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
2827
+ contractType?: Prisma.StringFieldUpdateOperationsInput | string;
2828
+ totalAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
2829
+ downPayment?: Prisma.FloatFieldUpdateOperationsInput | number;
2830
+ downPaymentPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
2831
+ principal?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
2832
+ interestRate?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
2833
+ termMonths?: Prisma.NullableIntFieldUpdateOperationsInput | number | null;
2834
+ periodicPayment?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
2835
+ totalPaidToDate?: Prisma.FloatFieldUpdateOperationsInput | number;
2836
+ totalInterestPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
2837
+ status?: Prisma.StringFieldUpdateOperationsInput | string;
2838
+ state?: Prisma.StringFieldUpdateOperationsInput | string;
2839
+ currentPhaseId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
2840
+ nextPaymentDueDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
2841
+ lastReminderSentAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
2842
+ startDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
2843
+ endDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
2844
+ signedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
2845
+ terminatedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
2846
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
2847
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
2848
+ phases?: Prisma.ContractPhaseUncheckedUpdateManyWithoutContractNestedInput;
2849
+ documents?: Prisma.ContractDocumentUncheckedUpdateManyWithoutContractNestedInput;
2850
+ payments?: Prisma.ContractPaymentUncheckedUpdateManyWithoutContractNestedInput;
2851
+ transitions?: Prisma.ContractTransitionUncheckedUpdateManyWithoutContractNestedInput;
2852
+ events?: Prisma.ContractEventUncheckedUpdateManyWithoutContractNestedInput;
2853
+ };
2854
+ export type ContractUncheckedUpdateManyWithoutTenantInput = {
2530
2855
  id?: Prisma.StringFieldUpdateOperationsInput | string;
2531
2856
  propertyUnitId?: Prisma.StringFieldUpdateOperationsInput | string;
2532
2857
  buyerId?: Prisma.StringFieldUpdateOperationsInput | string;
2858
+ sellerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
2533
2859
  paymentMethodId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
2534
2860
  contractNumber?: Prisma.StringFieldUpdateOperationsInput | string;
2535
2861
  title?: Prisma.StringFieldUpdateOperationsInput | string;
@@ -2558,6 +2884,7 @@ export type ContractUncheckedUpdateManyWithoutSellerInput = {
2558
2884
  };
2559
2885
  export type ContractCreateManyPropertyUnitInput = {
2560
2886
  id?: string;
2887
+ tenantId: string;
2561
2888
  buyerId: string;
2562
2889
  sellerId?: string | null;
2563
2890
  paymentMethodId?: string | null;
@@ -2612,6 +2939,7 @@ export type ContractUpdateWithoutPropertyUnitInput = {
2612
2939
  terminatedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
2613
2940
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
2614
2941
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
2942
+ tenant?: Prisma.TenantUpdateOneRequiredWithoutContractsNestedInput;
2615
2943
  buyer?: Prisma.UserUpdateOneRequiredWithoutContractsNestedInput;
2616
2944
  seller?: Prisma.UserUpdateOneWithoutSoldContractsNestedInput;
2617
2945
  paymentMethod?: Prisma.PropertyPaymentMethodUpdateOneWithoutContractsNestedInput;
@@ -2623,6 +2951,7 @@ export type ContractUpdateWithoutPropertyUnitInput = {
2623
2951
  };
2624
2952
  export type ContractUncheckedUpdateWithoutPropertyUnitInput = {
2625
2953
  id?: Prisma.StringFieldUpdateOperationsInput | string;
2954
+ tenantId?: Prisma.StringFieldUpdateOperationsInput | string;
2626
2955
  buyerId?: Prisma.StringFieldUpdateOperationsInput | string;
2627
2956
  sellerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
2628
2957
  paymentMethodId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
@@ -2658,6 +2987,7 @@ export type ContractUncheckedUpdateWithoutPropertyUnitInput = {
2658
2987
  };
2659
2988
  export type ContractUncheckedUpdateManyWithoutPropertyUnitInput = {
2660
2989
  id?: Prisma.StringFieldUpdateOperationsInput | string;
2990
+ tenantId?: Prisma.StringFieldUpdateOperationsInput | string;
2661
2991
  buyerId?: Prisma.StringFieldUpdateOperationsInput | string;
2662
2992
  sellerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
2663
2993
  paymentMethodId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
@@ -2688,6 +3018,7 @@ export type ContractUncheckedUpdateManyWithoutPropertyUnitInput = {
2688
3018
  };
2689
3019
  export type ContractCreateManyPaymentMethodInput = {
2690
3020
  id?: string;
3021
+ tenantId: string;
2691
3022
  propertyUnitId: string;
2692
3023
  buyerId: string;
2693
3024
  sellerId?: string | null;
@@ -2742,6 +3073,7 @@ export type ContractUpdateWithoutPaymentMethodInput = {
2742
3073
  terminatedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
2743
3074
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
2744
3075
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
3076
+ tenant?: Prisma.TenantUpdateOneRequiredWithoutContractsNestedInput;
2745
3077
  propertyUnit?: Prisma.PropertyUnitUpdateOneRequiredWithoutContractsNestedInput;
2746
3078
  buyer?: Prisma.UserUpdateOneRequiredWithoutContractsNestedInput;
2747
3079
  seller?: Prisma.UserUpdateOneWithoutSoldContractsNestedInput;
@@ -2753,6 +3085,7 @@ export type ContractUpdateWithoutPaymentMethodInput = {
2753
3085
  };
2754
3086
  export type ContractUncheckedUpdateWithoutPaymentMethodInput = {
2755
3087
  id?: Prisma.StringFieldUpdateOperationsInput | string;
3088
+ tenantId?: Prisma.StringFieldUpdateOperationsInput | string;
2756
3089
  propertyUnitId?: Prisma.StringFieldUpdateOperationsInput | string;
2757
3090
  buyerId?: Prisma.StringFieldUpdateOperationsInput | string;
2758
3091
  sellerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
@@ -2788,6 +3121,7 @@ export type ContractUncheckedUpdateWithoutPaymentMethodInput = {
2788
3121
  };
2789
3122
  export type ContractUncheckedUpdateManyWithoutPaymentMethodInput = {
2790
3123
  id?: Prisma.StringFieldUpdateOperationsInput | string;
3124
+ tenantId?: Prisma.StringFieldUpdateOperationsInput | string;
2791
3125
  propertyUnitId?: Prisma.StringFieldUpdateOperationsInput | string;
2792
3126
  buyerId?: Prisma.StringFieldUpdateOperationsInput | string;
2793
3127
  sellerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
@@ -2874,6 +3208,7 @@ export type ContractCountOutputTypeCountEventsArgs<ExtArgs extends runtime.Types
2874
3208
  };
2875
3209
  export type ContractSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
2876
3210
  id?: boolean;
3211
+ tenantId?: boolean;
2877
3212
  propertyUnitId?: boolean;
2878
3213
  buyerId?: boolean;
2879
3214
  sellerId?: boolean;
@@ -2902,6 +3237,7 @@ export type ContractSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs
2902
3237
  terminatedAt?: boolean;
2903
3238
  createdAt?: boolean;
2904
3239
  updatedAt?: boolean;
3240
+ tenant?: boolean | Prisma.TenantDefaultArgs<ExtArgs>;
2905
3241
  propertyUnit?: boolean | Prisma.PropertyUnitDefaultArgs<ExtArgs>;
2906
3242
  buyer?: boolean | Prisma.UserDefaultArgs<ExtArgs>;
2907
3243
  seller?: boolean | Prisma.Contract$sellerArgs<ExtArgs>;
@@ -2915,6 +3251,7 @@ export type ContractSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs
2915
3251
  }, ExtArgs["result"]["contract"]>;
2916
3252
  export type ContractSelectScalar = {
2917
3253
  id?: boolean;
3254
+ tenantId?: boolean;
2918
3255
  propertyUnitId?: boolean;
2919
3256
  buyerId?: boolean;
2920
3257
  sellerId?: boolean;
@@ -2944,8 +3281,9 @@ export type ContractSelectScalar = {
2944
3281
  createdAt?: boolean;
2945
3282
  updatedAt?: boolean;
2946
3283
  };
2947
- export type ContractOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "propertyUnitId" | "buyerId" | "sellerId" | "paymentMethodId" | "contractNumber" | "title" | "description" | "contractType" | "totalAmount" | "downPayment" | "downPaymentPaid" | "principal" | "interestRate" | "termMonths" | "periodicPayment" | "totalPaidToDate" | "totalInterestPaid" | "status" | "state" | "currentPhaseId" | "nextPaymentDueDate" | "lastReminderSentAt" | "startDate" | "endDate" | "signedAt" | "terminatedAt" | "createdAt" | "updatedAt", ExtArgs["result"]["contract"]>;
3284
+ export type ContractOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "tenantId" | "propertyUnitId" | "buyerId" | "sellerId" | "paymentMethodId" | "contractNumber" | "title" | "description" | "contractType" | "totalAmount" | "downPayment" | "downPaymentPaid" | "principal" | "interestRate" | "termMonths" | "periodicPayment" | "totalPaidToDate" | "totalInterestPaid" | "status" | "state" | "currentPhaseId" | "nextPaymentDueDate" | "lastReminderSentAt" | "startDate" | "endDate" | "signedAt" | "terminatedAt" | "createdAt" | "updatedAt", ExtArgs["result"]["contract"]>;
2948
3285
  export type ContractInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
3286
+ tenant?: boolean | Prisma.TenantDefaultArgs<ExtArgs>;
2949
3287
  propertyUnit?: boolean | Prisma.PropertyUnitDefaultArgs<ExtArgs>;
2950
3288
  buyer?: boolean | Prisma.UserDefaultArgs<ExtArgs>;
2951
3289
  seller?: boolean | Prisma.Contract$sellerArgs<ExtArgs>;
@@ -2960,6 +3298,7 @@ export type ContractInclude<ExtArgs extends runtime.Types.Extensions.InternalArg
2960
3298
  export type $ContractPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
2961
3299
  name: "Contract";
2962
3300
  objects: {
3301
+ tenant: Prisma.$TenantPayload<ExtArgs>;
2963
3302
  propertyUnit: Prisma.$PropertyUnitPayload<ExtArgs>;
2964
3303
  buyer: Prisma.$UserPayload<ExtArgs>;
2965
3304
  seller: Prisma.$UserPayload<ExtArgs> | null;
@@ -2972,6 +3311,7 @@ export type $ContractPayload<ExtArgs extends runtime.Types.Extensions.InternalAr
2972
3311
  };
2973
3312
  scalars: runtime.Types.Extensions.GetPayloadResult<{
2974
3313
  id: string;
3314
+ tenantId: string;
2975
3315
  propertyUnitId: string;
2976
3316
  buyerId: string;
2977
3317
  sellerId: string | null;
@@ -3277,6 +3617,7 @@ export interface ContractDelegate<ExtArgs extends runtime.Types.Extensions.Inter
3277
3617
  */
3278
3618
  export interface Prisma__ContractClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
3279
3619
  readonly [Symbol.toStringTag]: "PrismaPromise";
3620
+ 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>;
3280
3621
  propertyUnit<T extends Prisma.PropertyUnitDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.PropertyUnitDefaultArgs<ExtArgs>>): Prisma.Prisma__PropertyUnitClient<runtime.Types.Result.GetResult<Prisma.$PropertyUnitPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>;
3281
3622
  buyer<T extends Prisma.UserDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.UserDefaultArgs<ExtArgs>>): Prisma.Prisma__UserClient<runtime.Types.Result.GetResult<Prisma.$UserPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>;
3282
3623
  seller<T extends Prisma.Contract$sellerArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Contract$sellerArgs<ExtArgs>>): Prisma.Prisma__UserClient<runtime.Types.Result.GetResult<Prisma.$UserPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>;
@@ -3312,6 +3653,7 @@ export interface Prisma__ContractClient<T, Null = never, ExtArgs extends runtime
3312
3653
  */
3313
3654
  export interface ContractFieldRefs {
3314
3655
  readonly id: Prisma.FieldRef<"Contract", 'String'>;
3656
+ readonly tenantId: Prisma.FieldRef<"Contract", 'String'>;
3315
3657
  readonly propertyUnitId: Prisma.FieldRef<"Contract", 'String'>;
3316
3658
  readonly buyerId: Prisma.FieldRef<"Contract", 'String'>;
3317
3659
  readonly sellerId: Prisma.FieldRef<"Contract", 'String'>;