@valentine-efagene/qshelter-common 2.0.21 → 2.0.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/dist/generated/client/browser.d.ts +45 -30
  2. package/dist/generated/client/client.d.ts +45 -30
  3. package/dist/generated/client/commonInputTypes.d.ts +40 -0
  4. package/dist/generated/client/internal/class.d.ts +93 -60
  5. package/dist/generated/client/internal/class.js +2 -2
  6. package/dist/generated/client/internal/prismaNamespace.d.ts +1058 -720
  7. package/dist/generated/client/internal/prismaNamespace.js +321 -190
  8. package/dist/generated/client/internal/prismaNamespaceBrowser.d.ts +352 -215
  9. package/dist/generated/client/internal/prismaNamespaceBrowser.js +321 -190
  10. package/dist/generated/client/models/Amenity.d.ts +168 -1
  11. package/dist/generated/client/models/Contract.d.ts +2390 -309
  12. package/dist/generated/client/models/ContractDocument.d.ts +299 -12
  13. package/dist/generated/client/models/ContractEvent.d.ts +1052 -0
  14. package/dist/generated/client/models/ContractEvent.js +1 -0
  15. package/dist/generated/client/models/ContractInstallment.d.ts +1656 -0
  16. package/dist/generated/client/models/ContractInstallment.js +1 -0
  17. package/dist/generated/client/models/ContractPayment.d.ts +2026 -0
  18. package/dist/generated/client/models/ContractPayment.js +1 -0
  19. package/dist/generated/client/models/ContractPhase.d.ts +2467 -0
  20. package/dist/generated/client/models/ContractPhase.js +1 -0
  21. package/dist/generated/client/models/ContractPhaseStep.d.ts +1678 -0
  22. package/dist/generated/client/models/ContractPhaseStep.js +1 -0
  23. package/dist/generated/client/models/ContractPhaseStepApproval.d.ts +1249 -0
  24. package/dist/generated/client/models/ContractPhaseStepApproval.js +1 -0
  25. package/dist/generated/client/models/ContractTransition.d.ts +1118 -0
  26. package/dist/generated/client/models/ContractTransition.js +1 -0
  27. package/dist/generated/client/models/DomainEvent.d.ts +1240 -0
  28. package/dist/generated/client/models/DomainEvent.js +1 -0
  29. package/dist/generated/client/models/PaymentPlan.d.ts +467 -971
  30. package/dist/generated/client/models/Property.d.ts +372 -626
  31. package/dist/generated/client/models/PropertyPaymentMethod.d.ts +1714 -0
  32. package/dist/generated/client/models/PropertyPaymentMethod.js +1 -0
  33. package/dist/generated/client/models/PropertyPaymentMethodLink.d.ts +1158 -0
  34. package/dist/generated/client/models/PropertyPaymentMethodLink.js +1 -0
  35. package/dist/generated/client/models/PropertyPaymentMethodPhase.d.ts +1656 -0
  36. package/dist/generated/client/models/PropertyPaymentMethodPhase.js +1 -0
  37. package/dist/generated/client/models/PropertyUnit.d.ts +1598 -0
  38. package/dist/generated/client/models/PropertyUnit.js +1 -0
  39. package/dist/generated/client/models/PropertyVariant.d.ts +2079 -0
  40. package/dist/generated/client/models/PropertyVariant.js +1 -0
  41. package/dist/generated/client/models/PropertyVariantAmenity.d.ts +1080 -0
  42. package/dist/generated/client/models/PropertyVariantAmenity.js +1 -0
  43. package/dist/generated/client/models/PropertyVariantMedia.d.ts +1189 -0
  44. package/dist/generated/client/models/PropertyVariantMedia.js +1 -0
  45. package/dist/generated/client/models/Tenant.d.ts +482 -0
  46. package/dist/generated/client/models/User.d.ts +684 -427
  47. package/dist/generated/client/models/index.d.ts +15 -12
  48. package/dist/generated/client/models/index.js +15 -12
  49. package/dist/generated/client/models.d.ts +15 -12
  50. package/dist/src/index.d.ts +2 -0
  51. package/dist/src/index.js +2 -0
  52. package/dist/src/middleware/error-handler.d.ts +6 -0
  53. package/dist/src/middleware/error-handler.js +26 -0
  54. package/dist/src/middleware/index.d.ts +3 -0
  55. package/dist/src/middleware/index.js +3 -0
  56. package/dist/src/middleware/request-logger.d.ts +6 -0
  57. package/dist/src/middleware/request-logger.js +17 -0
  58. package/dist/src/middleware/tenant.d.ts +61 -0
  59. package/dist/src/middleware/tenant.js +85 -0
  60. package/dist/src/prisma/tenant.d.ts +51 -0
  61. package/dist/src/prisma/tenant.js +211 -0
  62. package/package.json +16 -2
  63. package/prisma/migrations/20251230104059_add_property_variants/migration.sql +622 -0
  64. package/prisma/migrations/20251230113413_add_multitenancy/migration.sql +54 -0
  65. package/prisma/schema.prisma +561 -267
@@ -7,20 +7,58 @@ import type * as Prisma from "../internal/prismaNamespace.js";
7
7
  export type ContractModel = runtime.Types.Result.DefaultSelection<Prisma.$ContractPayload>;
8
8
  export type AggregateContract = {
9
9
  _count: ContractCountAggregateOutputType | null;
10
+ _avg: ContractAvgAggregateOutputType | null;
11
+ _sum: ContractSumAggregateOutputType | null;
10
12
  _min: ContractMinAggregateOutputType | null;
11
13
  _max: ContractMaxAggregateOutputType | null;
12
14
  };
15
+ export type ContractAvgAggregateOutputType = {
16
+ totalAmount: number | null;
17
+ downPayment: number | null;
18
+ downPaymentPaid: number | null;
19
+ principal: number | null;
20
+ interestRate: number | null;
21
+ termMonths: number | null;
22
+ periodicPayment: number | null;
23
+ totalPaidToDate: number | null;
24
+ totalInterestPaid: number | null;
25
+ };
26
+ export type ContractSumAggregateOutputType = {
27
+ totalAmount: number | null;
28
+ downPayment: number | null;
29
+ downPaymentPaid: number | null;
30
+ principal: number | null;
31
+ interestRate: number | null;
32
+ termMonths: number | null;
33
+ periodicPayment: number | null;
34
+ totalPaidToDate: number | null;
35
+ totalInterestPaid: number | null;
36
+ };
13
37
  export type ContractMinAggregateOutputType = {
14
38
  id: string | null;
15
- propertyId: string | null;
16
- paymentPlanId: string | null;
39
+ tenantId: string | null;
40
+ propertyUnitId: string | null;
17
41
  buyerId: string | null;
18
42
  sellerId: string | null;
19
- contractType: string | null;
43
+ paymentMethodId: string | null;
20
44
  contractNumber: string | null;
21
45
  title: string | null;
22
46
  description: string | null;
47
+ contractType: string | null;
48
+ totalAmount: number | null;
49
+ downPayment: number | null;
50
+ downPaymentPaid: number | null;
51
+ principal: number | null;
52
+ interestRate: number | null;
53
+ termMonths: number | null;
54
+ periodicPayment: number | null;
55
+ totalPaidToDate: number | null;
56
+ totalInterestPaid: number | null;
23
57
  status: string | null;
58
+ state: string | null;
59
+ currentPhaseId: string | null;
60
+ nextPaymentDueDate: Date | null;
61
+ lastReminderSentAt: Date | null;
24
62
  startDate: Date | null;
25
63
  endDate: Date | null;
26
64
  signedAt: Date | null;
@@ -30,15 +68,29 @@ export type ContractMinAggregateOutputType = {
30
68
  };
31
69
  export type ContractMaxAggregateOutputType = {
32
70
  id: string | null;
33
- propertyId: string | null;
34
- paymentPlanId: string | null;
71
+ tenantId: string | null;
72
+ propertyUnitId: string | null;
35
73
  buyerId: string | null;
36
74
  sellerId: string | null;
37
- contractType: string | null;
75
+ paymentMethodId: string | null;
38
76
  contractNumber: string | null;
39
77
  title: string | null;
40
78
  description: string | null;
79
+ contractType: string | null;
80
+ totalAmount: number | null;
81
+ downPayment: number | null;
82
+ downPaymentPaid: number | null;
83
+ principal: number | null;
84
+ interestRate: number | null;
85
+ termMonths: number | null;
86
+ periodicPayment: number | null;
87
+ totalPaidToDate: number | null;
88
+ totalInterestPaid: number | null;
41
89
  status: string | null;
90
+ state: string | null;
91
+ currentPhaseId: string | null;
92
+ nextPaymentDueDate: Date | null;
93
+ lastReminderSentAt: Date | null;
42
94
  startDate: Date | null;
43
95
  endDate: Date | null;
44
96
  signedAt: Date | null;
@@ -48,15 +100,29 @@ export type ContractMaxAggregateOutputType = {
48
100
  };
49
101
  export type ContractCountAggregateOutputType = {
50
102
  id: number;
51
- propertyId: number;
52
- paymentPlanId: number;
103
+ tenantId: number;
104
+ propertyUnitId: number;
53
105
  buyerId: number;
54
106
  sellerId: number;
55
- contractType: number;
107
+ paymentMethodId: number;
56
108
  contractNumber: number;
57
109
  title: number;
58
110
  description: number;
111
+ contractType: number;
112
+ totalAmount: number;
113
+ downPayment: number;
114
+ downPaymentPaid: number;
115
+ principal: number;
116
+ interestRate: number;
117
+ termMonths: number;
118
+ periodicPayment: number;
119
+ totalPaidToDate: number;
120
+ totalInterestPaid: number;
59
121
  status: number;
122
+ state: number;
123
+ currentPhaseId: number;
124
+ nextPaymentDueDate: number;
125
+ lastReminderSentAt: number;
60
126
  startDate: number;
61
127
  endDate: number;
62
128
  signedAt: number;
@@ -65,17 +131,53 @@ export type ContractCountAggregateOutputType = {
65
131
  updatedAt: number;
66
132
  _all: number;
67
133
  };
134
+ export type ContractAvgAggregateInputType = {
135
+ totalAmount?: true;
136
+ downPayment?: true;
137
+ downPaymentPaid?: true;
138
+ principal?: true;
139
+ interestRate?: true;
140
+ termMonths?: true;
141
+ periodicPayment?: true;
142
+ totalPaidToDate?: true;
143
+ totalInterestPaid?: true;
144
+ };
145
+ export type ContractSumAggregateInputType = {
146
+ totalAmount?: true;
147
+ downPayment?: true;
148
+ downPaymentPaid?: true;
149
+ principal?: true;
150
+ interestRate?: true;
151
+ termMonths?: true;
152
+ periodicPayment?: true;
153
+ totalPaidToDate?: true;
154
+ totalInterestPaid?: true;
155
+ };
68
156
  export type ContractMinAggregateInputType = {
69
157
  id?: true;
70
- propertyId?: true;
71
- paymentPlanId?: true;
158
+ tenantId?: true;
159
+ propertyUnitId?: true;
72
160
  buyerId?: true;
73
161
  sellerId?: true;
74
- contractType?: true;
162
+ paymentMethodId?: true;
75
163
  contractNumber?: true;
76
164
  title?: true;
77
165
  description?: true;
166
+ contractType?: true;
167
+ totalAmount?: true;
168
+ downPayment?: true;
169
+ downPaymentPaid?: true;
170
+ principal?: true;
171
+ interestRate?: true;
172
+ termMonths?: true;
173
+ periodicPayment?: true;
174
+ totalPaidToDate?: true;
175
+ totalInterestPaid?: true;
78
176
  status?: true;
177
+ state?: true;
178
+ currentPhaseId?: true;
179
+ nextPaymentDueDate?: true;
180
+ lastReminderSentAt?: true;
79
181
  startDate?: true;
80
182
  endDate?: true;
81
183
  signedAt?: true;
@@ -85,15 +187,29 @@ export type ContractMinAggregateInputType = {
85
187
  };
86
188
  export type ContractMaxAggregateInputType = {
87
189
  id?: true;
88
- propertyId?: true;
89
- paymentPlanId?: true;
190
+ tenantId?: true;
191
+ propertyUnitId?: true;
90
192
  buyerId?: true;
91
193
  sellerId?: true;
92
- contractType?: true;
194
+ paymentMethodId?: true;
93
195
  contractNumber?: true;
94
196
  title?: true;
95
197
  description?: true;
198
+ contractType?: true;
199
+ totalAmount?: true;
200
+ downPayment?: true;
201
+ downPaymentPaid?: true;
202
+ principal?: true;
203
+ interestRate?: true;
204
+ termMonths?: true;
205
+ periodicPayment?: true;
206
+ totalPaidToDate?: true;
207
+ totalInterestPaid?: true;
96
208
  status?: true;
209
+ state?: true;
210
+ currentPhaseId?: true;
211
+ nextPaymentDueDate?: true;
212
+ lastReminderSentAt?: true;
97
213
  startDate?: true;
98
214
  endDate?: true;
99
215
  signedAt?: true;
@@ -103,15 +219,29 @@ export type ContractMaxAggregateInputType = {
103
219
  };
104
220
  export type ContractCountAggregateInputType = {
105
221
  id?: true;
106
- propertyId?: true;
107
- paymentPlanId?: true;
222
+ tenantId?: true;
223
+ propertyUnitId?: true;
108
224
  buyerId?: true;
109
225
  sellerId?: true;
110
- contractType?: true;
226
+ paymentMethodId?: true;
111
227
  contractNumber?: true;
112
228
  title?: true;
113
229
  description?: true;
230
+ contractType?: true;
231
+ totalAmount?: true;
232
+ downPayment?: true;
233
+ downPaymentPaid?: true;
234
+ principal?: true;
235
+ interestRate?: true;
236
+ termMonths?: true;
237
+ periodicPayment?: true;
238
+ totalPaidToDate?: true;
239
+ totalInterestPaid?: true;
114
240
  status?: true;
241
+ state?: true;
242
+ currentPhaseId?: true;
243
+ nextPaymentDueDate?: true;
244
+ lastReminderSentAt?: true;
115
245
  startDate?: true;
116
246
  endDate?: true;
117
247
  signedAt?: true;
@@ -155,6 +285,18 @@ export type ContractAggregateArgs<ExtArgs extends runtime.Types.Extensions.Inter
155
285
  * Count returned Contracts
156
286
  **/
157
287
  _count?: true | ContractCountAggregateInputType;
288
+ /**
289
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
290
+ *
291
+ * Select which fields to average
292
+ **/
293
+ _avg?: ContractAvgAggregateInputType;
294
+ /**
295
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
296
+ *
297
+ * Select which fields to sum
298
+ **/
299
+ _sum?: ContractSumAggregateInputType;
158
300
  /**
159
301
  * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
160
302
  *
@@ -179,20 +321,36 @@ export type ContractGroupByArgs<ExtArgs extends runtime.Types.Extensions.Interna
179
321
  take?: number;
180
322
  skip?: number;
181
323
  _count?: ContractCountAggregateInputType | true;
324
+ _avg?: ContractAvgAggregateInputType;
325
+ _sum?: ContractSumAggregateInputType;
182
326
  _min?: ContractMinAggregateInputType;
183
327
  _max?: ContractMaxAggregateInputType;
184
328
  };
185
329
  export type ContractGroupByOutputType = {
186
330
  id: string;
187
- propertyId: string;
188
- paymentPlanId: string | null;
189
- buyerId: string | null;
331
+ tenantId: string;
332
+ propertyUnitId: string;
333
+ buyerId: string;
190
334
  sellerId: string | null;
191
- contractType: string;
335
+ paymentMethodId: string | null;
192
336
  contractNumber: string;
193
337
  title: string;
194
338
  description: string | null;
339
+ contractType: string;
340
+ totalAmount: number;
341
+ downPayment: number;
342
+ downPaymentPaid: number;
343
+ principal: number | null;
344
+ interestRate: number | null;
345
+ termMonths: number | null;
346
+ periodicPayment: number | null;
347
+ totalPaidToDate: number;
348
+ totalInterestPaid: number;
195
349
  status: string;
350
+ state: string;
351
+ currentPhaseId: string | null;
352
+ nextPaymentDueDate: Date | null;
353
+ lastReminderSentAt: Date | null;
196
354
  startDate: Date | null;
197
355
  endDate: Date | null;
198
356
  signedAt: Date | null;
@@ -200,6 +358,8 @@ export type ContractGroupByOutputType = {
200
358
  createdAt: Date;
201
359
  updatedAt: Date;
202
360
  _count: ContractCountAggregateOutputType | null;
361
+ _avg: ContractAvgAggregateOutputType | null;
362
+ _sum: ContractSumAggregateOutputType | null;
203
363
  _min: ContractMinAggregateOutputType | null;
204
364
  _max: ContractMaxAggregateOutputType | null;
205
365
  };
@@ -211,88 +371,159 @@ export type ContractWhereInput = {
211
371
  OR?: Prisma.ContractWhereInput[];
212
372
  NOT?: Prisma.ContractWhereInput | Prisma.ContractWhereInput[];
213
373
  id?: Prisma.StringFilter<"Contract"> | string;
214
- propertyId?: Prisma.StringFilter<"Contract"> | string;
215
- paymentPlanId?: Prisma.StringNullableFilter<"Contract"> | string | null;
216
- buyerId?: Prisma.StringNullableFilter<"Contract"> | string | null;
374
+ tenantId?: Prisma.StringFilter<"Contract"> | string;
375
+ propertyUnitId?: Prisma.StringFilter<"Contract"> | string;
376
+ buyerId?: Prisma.StringFilter<"Contract"> | string;
217
377
  sellerId?: Prisma.StringNullableFilter<"Contract"> | string | null;
218
- contractType?: Prisma.StringFilter<"Contract"> | string;
378
+ paymentMethodId?: Prisma.StringNullableFilter<"Contract"> | string | null;
219
379
  contractNumber?: Prisma.StringFilter<"Contract"> | string;
220
380
  title?: Prisma.StringFilter<"Contract"> | string;
221
381
  description?: Prisma.StringNullableFilter<"Contract"> | string | null;
382
+ contractType?: Prisma.StringFilter<"Contract"> | string;
383
+ totalAmount?: Prisma.FloatFilter<"Contract"> | number;
384
+ downPayment?: Prisma.FloatFilter<"Contract"> | number;
385
+ downPaymentPaid?: Prisma.FloatFilter<"Contract"> | number;
386
+ principal?: Prisma.FloatNullableFilter<"Contract"> | number | null;
387
+ interestRate?: Prisma.FloatNullableFilter<"Contract"> | number | null;
388
+ termMonths?: Prisma.IntNullableFilter<"Contract"> | number | null;
389
+ periodicPayment?: Prisma.FloatNullableFilter<"Contract"> | number | null;
390
+ totalPaidToDate?: Prisma.FloatFilter<"Contract"> | number;
391
+ totalInterestPaid?: Prisma.FloatFilter<"Contract"> | number;
222
392
  status?: Prisma.StringFilter<"Contract"> | string;
393
+ state?: Prisma.StringFilter<"Contract"> | string;
394
+ currentPhaseId?: Prisma.StringNullableFilter<"Contract"> | string | null;
395
+ nextPaymentDueDate?: Prisma.DateTimeNullableFilter<"Contract"> | Date | string | null;
396
+ lastReminderSentAt?: Prisma.DateTimeNullableFilter<"Contract"> | Date | string | null;
223
397
  startDate?: Prisma.DateTimeNullableFilter<"Contract"> | Date | string | null;
224
398
  endDate?: Prisma.DateTimeNullableFilter<"Contract"> | Date | string | null;
225
399
  signedAt?: Prisma.DateTimeNullableFilter<"Contract"> | Date | string | null;
226
400
  terminatedAt?: Prisma.DateTimeNullableFilter<"Contract"> | Date | string | null;
227
401
  createdAt?: Prisma.DateTimeFilter<"Contract"> | Date | string;
228
402
  updatedAt?: Prisma.DateTimeFilter<"Contract"> | Date | string;
229
- property?: Prisma.XOR<Prisma.PropertyScalarRelationFilter, Prisma.PropertyWhereInput>;
230
- paymentPlan?: Prisma.XOR<Prisma.PaymentPlanNullableScalarRelationFilter, Prisma.PaymentPlanWhereInput> | null;
231
- buyer?: Prisma.XOR<Prisma.UserNullableScalarRelationFilter, Prisma.UserWhereInput> | null;
403
+ tenant?: Prisma.XOR<Prisma.TenantScalarRelationFilter, Prisma.TenantWhereInput>;
404
+ propertyUnit?: Prisma.XOR<Prisma.PropertyUnitScalarRelationFilter, Prisma.PropertyUnitWhereInput>;
405
+ buyer?: Prisma.XOR<Prisma.UserScalarRelationFilter, Prisma.UserWhereInput>;
232
406
  seller?: Prisma.XOR<Prisma.UserNullableScalarRelationFilter, Prisma.UserWhereInput> | null;
407
+ paymentMethod?: Prisma.XOR<Prisma.PropertyPaymentMethodNullableScalarRelationFilter, Prisma.PropertyPaymentMethodWhereInput> | null;
408
+ phases?: Prisma.ContractPhaseListRelationFilter;
233
409
  documents?: Prisma.ContractDocumentListRelationFilter;
410
+ payments?: Prisma.ContractPaymentListRelationFilter;
411
+ transitions?: Prisma.ContractTransitionListRelationFilter;
412
+ events?: Prisma.ContractEventListRelationFilter;
234
413
  };
235
414
  export type ContractOrderByWithRelationInput = {
236
415
  id?: Prisma.SortOrder;
237
- propertyId?: Prisma.SortOrder;
238
- paymentPlanId?: Prisma.SortOrderInput | Prisma.SortOrder;
239
- buyerId?: Prisma.SortOrderInput | Prisma.SortOrder;
416
+ tenantId?: Prisma.SortOrder;
417
+ propertyUnitId?: Prisma.SortOrder;
418
+ buyerId?: Prisma.SortOrder;
240
419
  sellerId?: Prisma.SortOrderInput | Prisma.SortOrder;
241
- contractType?: Prisma.SortOrder;
420
+ paymentMethodId?: Prisma.SortOrderInput | Prisma.SortOrder;
242
421
  contractNumber?: Prisma.SortOrder;
243
422
  title?: Prisma.SortOrder;
244
423
  description?: Prisma.SortOrderInput | Prisma.SortOrder;
424
+ contractType?: Prisma.SortOrder;
425
+ totalAmount?: Prisma.SortOrder;
426
+ downPayment?: Prisma.SortOrder;
427
+ downPaymentPaid?: Prisma.SortOrder;
428
+ principal?: Prisma.SortOrderInput | Prisma.SortOrder;
429
+ interestRate?: Prisma.SortOrderInput | Prisma.SortOrder;
430
+ termMonths?: Prisma.SortOrderInput | Prisma.SortOrder;
431
+ periodicPayment?: Prisma.SortOrderInput | Prisma.SortOrder;
432
+ totalPaidToDate?: Prisma.SortOrder;
433
+ totalInterestPaid?: Prisma.SortOrder;
245
434
  status?: Prisma.SortOrder;
435
+ state?: Prisma.SortOrder;
436
+ currentPhaseId?: Prisma.SortOrderInput | Prisma.SortOrder;
437
+ nextPaymentDueDate?: Prisma.SortOrderInput | Prisma.SortOrder;
438
+ lastReminderSentAt?: Prisma.SortOrderInput | Prisma.SortOrder;
246
439
  startDate?: Prisma.SortOrderInput | Prisma.SortOrder;
247
440
  endDate?: Prisma.SortOrderInput | Prisma.SortOrder;
248
441
  signedAt?: Prisma.SortOrderInput | Prisma.SortOrder;
249
442
  terminatedAt?: Prisma.SortOrderInput | Prisma.SortOrder;
250
443
  createdAt?: Prisma.SortOrder;
251
444
  updatedAt?: Prisma.SortOrder;
252
- property?: Prisma.PropertyOrderByWithRelationInput;
253
- paymentPlan?: Prisma.PaymentPlanOrderByWithRelationInput;
445
+ tenant?: Prisma.TenantOrderByWithRelationInput;
446
+ propertyUnit?: Prisma.PropertyUnitOrderByWithRelationInput;
254
447
  buyer?: Prisma.UserOrderByWithRelationInput;
255
448
  seller?: Prisma.UserOrderByWithRelationInput;
449
+ paymentMethod?: Prisma.PropertyPaymentMethodOrderByWithRelationInput;
450
+ phases?: Prisma.ContractPhaseOrderByRelationAggregateInput;
256
451
  documents?: Prisma.ContractDocumentOrderByRelationAggregateInput;
452
+ payments?: Prisma.ContractPaymentOrderByRelationAggregateInput;
453
+ transitions?: Prisma.ContractTransitionOrderByRelationAggregateInput;
454
+ events?: Prisma.ContractEventOrderByRelationAggregateInput;
257
455
  _relevance?: Prisma.ContractOrderByRelevanceInput;
258
456
  };
259
457
  export type ContractWhereUniqueInput = Prisma.AtLeast<{
260
458
  id?: string;
261
- paymentPlanId?: string;
262
459
  contractNumber?: string;
263
460
  AND?: Prisma.ContractWhereInput | Prisma.ContractWhereInput[];
264
461
  OR?: Prisma.ContractWhereInput[];
265
462
  NOT?: Prisma.ContractWhereInput | Prisma.ContractWhereInput[];
266
- propertyId?: Prisma.StringFilter<"Contract"> | string;
267
- buyerId?: Prisma.StringNullableFilter<"Contract"> | string | null;
463
+ tenantId?: Prisma.StringFilter<"Contract"> | string;
464
+ propertyUnitId?: Prisma.StringFilter<"Contract"> | string;
465
+ buyerId?: Prisma.StringFilter<"Contract"> | string;
268
466
  sellerId?: Prisma.StringNullableFilter<"Contract"> | string | null;
269
- contractType?: Prisma.StringFilter<"Contract"> | string;
467
+ paymentMethodId?: Prisma.StringNullableFilter<"Contract"> | string | null;
270
468
  title?: Prisma.StringFilter<"Contract"> | string;
271
469
  description?: Prisma.StringNullableFilter<"Contract"> | string | null;
470
+ contractType?: Prisma.StringFilter<"Contract"> | string;
471
+ totalAmount?: Prisma.FloatFilter<"Contract"> | number;
472
+ downPayment?: Prisma.FloatFilter<"Contract"> | number;
473
+ downPaymentPaid?: Prisma.FloatFilter<"Contract"> | number;
474
+ principal?: Prisma.FloatNullableFilter<"Contract"> | number | null;
475
+ interestRate?: Prisma.FloatNullableFilter<"Contract"> | number | null;
476
+ termMonths?: Prisma.IntNullableFilter<"Contract"> | number | null;
477
+ periodicPayment?: Prisma.FloatNullableFilter<"Contract"> | number | null;
478
+ totalPaidToDate?: Prisma.FloatFilter<"Contract"> | number;
479
+ totalInterestPaid?: Prisma.FloatFilter<"Contract"> | number;
272
480
  status?: Prisma.StringFilter<"Contract"> | string;
481
+ state?: Prisma.StringFilter<"Contract"> | string;
482
+ currentPhaseId?: Prisma.StringNullableFilter<"Contract"> | string | null;
483
+ nextPaymentDueDate?: Prisma.DateTimeNullableFilter<"Contract"> | Date | string | null;
484
+ lastReminderSentAt?: Prisma.DateTimeNullableFilter<"Contract"> | Date | string | null;
273
485
  startDate?: Prisma.DateTimeNullableFilter<"Contract"> | Date | string | null;
274
486
  endDate?: Prisma.DateTimeNullableFilter<"Contract"> | Date | string | null;
275
487
  signedAt?: Prisma.DateTimeNullableFilter<"Contract"> | Date | string | null;
276
488
  terminatedAt?: Prisma.DateTimeNullableFilter<"Contract"> | Date | string | null;
277
489
  createdAt?: Prisma.DateTimeFilter<"Contract"> | Date | string;
278
490
  updatedAt?: Prisma.DateTimeFilter<"Contract"> | Date | string;
279
- property?: Prisma.XOR<Prisma.PropertyScalarRelationFilter, Prisma.PropertyWhereInput>;
280
- paymentPlan?: Prisma.XOR<Prisma.PaymentPlanNullableScalarRelationFilter, Prisma.PaymentPlanWhereInput> | null;
281
- buyer?: Prisma.XOR<Prisma.UserNullableScalarRelationFilter, Prisma.UserWhereInput> | null;
491
+ tenant?: Prisma.XOR<Prisma.TenantScalarRelationFilter, Prisma.TenantWhereInput>;
492
+ propertyUnit?: Prisma.XOR<Prisma.PropertyUnitScalarRelationFilter, Prisma.PropertyUnitWhereInput>;
493
+ buyer?: Prisma.XOR<Prisma.UserScalarRelationFilter, Prisma.UserWhereInput>;
282
494
  seller?: Prisma.XOR<Prisma.UserNullableScalarRelationFilter, Prisma.UserWhereInput> | null;
495
+ paymentMethod?: Prisma.XOR<Prisma.PropertyPaymentMethodNullableScalarRelationFilter, Prisma.PropertyPaymentMethodWhereInput> | null;
496
+ phases?: Prisma.ContractPhaseListRelationFilter;
283
497
  documents?: Prisma.ContractDocumentListRelationFilter;
284
- }, "id" | "paymentPlanId" | "contractNumber">;
498
+ payments?: Prisma.ContractPaymentListRelationFilter;
499
+ transitions?: Prisma.ContractTransitionListRelationFilter;
500
+ events?: Prisma.ContractEventListRelationFilter;
501
+ }, "id" | "contractNumber">;
285
502
  export type ContractOrderByWithAggregationInput = {
286
503
  id?: Prisma.SortOrder;
287
- propertyId?: Prisma.SortOrder;
288
- paymentPlanId?: Prisma.SortOrderInput | Prisma.SortOrder;
289
- buyerId?: Prisma.SortOrderInput | Prisma.SortOrder;
504
+ tenantId?: Prisma.SortOrder;
505
+ propertyUnitId?: Prisma.SortOrder;
506
+ buyerId?: Prisma.SortOrder;
290
507
  sellerId?: Prisma.SortOrderInput | Prisma.SortOrder;
291
- contractType?: Prisma.SortOrder;
508
+ paymentMethodId?: Prisma.SortOrderInput | Prisma.SortOrder;
292
509
  contractNumber?: Prisma.SortOrder;
293
510
  title?: Prisma.SortOrder;
294
511
  description?: Prisma.SortOrderInput | Prisma.SortOrder;
512
+ contractType?: Prisma.SortOrder;
513
+ totalAmount?: Prisma.SortOrder;
514
+ downPayment?: Prisma.SortOrder;
515
+ downPaymentPaid?: Prisma.SortOrder;
516
+ principal?: Prisma.SortOrderInput | Prisma.SortOrder;
517
+ interestRate?: Prisma.SortOrderInput | Prisma.SortOrder;
518
+ termMonths?: Prisma.SortOrderInput | Prisma.SortOrder;
519
+ periodicPayment?: Prisma.SortOrderInput | Prisma.SortOrder;
520
+ totalPaidToDate?: Prisma.SortOrder;
521
+ totalInterestPaid?: Prisma.SortOrder;
295
522
  status?: Prisma.SortOrder;
523
+ state?: Prisma.SortOrder;
524
+ currentPhaseId?: Prisma.SortOrderInput | Prisma.SortOrder;
525
+ nextPaymentDueDate?: Prisma.SortOrderInput | Prisma.SortOrder;
526
+ lastReminderSentAt?: Prisma.SortOrderInput | Prisma.SortOrder;
296
527
  startDate?: Prisma.SortOrderInput | Prisma.SortOrder;
297
528
  endDate?: Prisma.SortOrderInput | Prisma.SortOrder;
298
529
  signedAt?: Prisma.SortOrderInput | Prisma.SortOrder;
@@ -300,23 +531,39 @@ export type ContractOrderByWithAggregationInput = {
300
531
  createdAt?: Prisma.SortOrder;
301
532
  updatedAt?: Prisma.SortOrder;
302
533
  _count?: Prisma.ContractCountOrderByAggregateInput;
534
+ _avg?: Prisma.ContractAvgOrderByAggregateInput;
303
535
  _max?: Prisma.ContractMaxOrderByAggregateInput;
304
536
  _min?: Prisma.ContractMinOrderByAggregateInput;
537
+ _sum?: Prisma.ContractSumOrderByAggregateInput;
305
538
  };
306
539
  export type ContractScalarWhereWithAggregatesInput = {
307
540
  AND?: Prisma.ContractScalarWhereWithAggregatesInput | Prisma.ContractScalarWhereWithAggregatesInput[];
308
541
  OR?: Prisma.ContractScalarWhereWithAggregatesInput[];
309
542
  NOT?: Prisma.ContractScalarWhereWithAggregatesInput | Prisma.ContractScalarWhereWithAggregatesInput[];
310
543
  id?: Prisma.StringWithAggregatesFilter<"Contract"> | string;
311
- propertyId?: Prisma.StringWithAggregatesFilter<"Contract"> | string;
312
- paymentPlanId?: Prisma.StringNullableWithAggregatesFilter<"Contract"> | string | null;
313
- buyerId?: Prisma.StringNullableWithAggregatesFilter<"Contract"> | string | null;
544
+ tenantId?: Prisma.StringWithAggregatesFilter<"Contract"> | string;
545
+ propertyUnitId?: Prisma.StringWithAggregatesFilter<"Contract"> | string;
546
+ buyerId?: Prisma.StringWithAggregatesFilter<"Contract"> | string;
314
547
  sellerId?: Prisma.StringNullableWithAggregatesFilter<"Contract"> | string | null;
315
- contractType?: Prisma.StringWithAggregatesFilter<"Contract"> | string;
548
+ paymentMethodId?: Prisma.StringNullableWithAggregatesFilter<"Contract"> | string | null;
316
549
  contractNumber?: Prisma.StringWithAggregatesFilter<"Contract"> | string;
317
550
  title?: Prisma.StringWithAggregatesFilter<"Contract"> | string;
318
551
  description?: Prisma.StringNullableWithAggregatesFilter<"Contract"> | string | null;
552
+ contractType?: Prisma.StringWithAggregatesFilter<"Contract"> | string;
553
+ totalAmount?: Prisma.FloatWithAggregatesFilter<"Contract"> | number;
554
+ downPayment?: Prisma.FloatWithAggregatesFilter<"Contract"> | number;
555
+ downPaymentPaid?: Prisma.FloatWithAggregatesFilter<"Contract"> | number;
556
+ principal?: Prisma.FloatNullableWithAggregatesFilter<"Contract"> | number | null;
557
+ interestRate?: Prisma.FloatNullableWithAggregatesFilter<"Contract"> | number | null;
558
+ termMonths?: Prisma.IntNullableWithAggregatesFilter<"Contract"> | number | null;
559
+ periodicPayment?: Prisma.FloatNullableWithAggregatesFilter<"Contract"> | number | null;
560
+ totalPaidToDate?: Prisma.FloatWithAggregatesFilter<"Contract"> | number;
561
+ totalInterestPaid?: Prisma.FloatWithAggregatesFilter<"Contract"> | number;
319
562
  status?: Prisma.StringWithAggregatesFilter<"Contract"> | string;
563
+ state?: Prisma.StringWithAggregatesFilter<"Contract"> | string;
564
+ currentPhaseId?: Prisma.StringNullableWithAggregatesFilter<"Contract"> | string | null;
565
+ nextPaymentDueDate?: Prisma.DateTimeNullableWithAggregatesFilter<"Contract"> | Date | string | null;
566
+ lastReminderSentAt?: Prisma.DateTimeNullableWithAggregatesFilter<"Contract"> | Date | string | null;
320
567
  startDate?: Prisma.DateTimeNullableWithAggregatesFilter<"Contract"> | Date | string | null;
321
568
  endDate?: Prisma.DateTimeNullableWithAggregatesFilter<"Contract"> | Date | string | null;
322
569
  signedAt?: Prisma.DateTimeNullableWithAggregatesFilter<"Contract"> | Date | string | null;
@@ -326,91 +573,177 @@ export type ContractScalarWhereWithAggregatesInput = {
326
573
  };
327
574
  export type ContractCreateInput = {
328
575
  id?: string;
329
- contractType: string;
330
576
  contractNumber: string;
331
577
  title: string;
332
578
  description?: string | null;
579
+ contractType: string;
580
+ totalAmount: number;
581
+ downPayment?: number;
582
+ downPaymentPaid?: number;
583
+ principal?: number | null;
584
+ interestRate?: number | null;
585
+ termMonths?: number | null;
586
+ periodicPayment?: number | null;
587
+ totalPaidToDate?: number;
588
+ totalInterestPaid?: number;
333
589
  status?: string;
590
+ state?: string;
591
+ currentPhaseId?: string | null;
592
+ nextPaymentDueDate?: Date | string | null;
593
+ lastReminderSentAt?: Date | string | null;
334
594
  startDate?: Date | string | null;
335
595
  endDate?: Date | string | null;
336
596
  signedAt?: Date | string | null;
337
597
  terminatedAt?: Date | string | null;
338
598
  createdAt?: Date | string;
339
599
  updatedAt?: Date | string;
340
- property: Prisma.PropertyCreateNestedOneWithoutContractsInput;
341
- paymentPlan?: Prisma.PaymentPlanCreateNestedOneWithoutContractInput;
342
- buyer?: Prisma.UserCreateNestedOneWithoutContractsInput;
600
+ tenant: Prisma.TenantCreateNestedOneWithoutContractsInput;
601
+ propertyUnit: Prisma.PropertyUnitCreateNestedOneWithoutContractsInput;
602
+ buyer: Prisma.UserCreateNestedOneWithoutContractsInput;
343
603
  seller?: Prisma.UserCreateNestedOneWithoutSoldContractsInput;
604
+ paymentMethod?: Prisma.PropertyPaymentMethodCreateNestedOneWithoutContractsInput;
605
+ phases?: Prisma.ContractPhaseCreateNestedManyWithoutContractInput;
344
606
  documents?: Prisma.ContractDocumentCreateNestedManyWithoutContractInput;
607
+ payments?: Prisma.ContractPaymentCreateNestedManyWithoutContractInput;
608
+ transitions?: Prisma.ContractTransitionCreateNestedManyWithoutContractInput;
609
+ events?: Prisma.ContractEventCreateNestedManyWithoutContractInput;
345
610
  };
346
611
  export type ContractUncheckedCreateInput = {
347
612
  id?: string;
348
- propertyId: string;
349
- paymentPlanId?: string | null;
350
- buyerId?: string | null;
613
+ tenantId: string;
614
+ propertyUnitId: string;
615
+ buyerId: string;
351
616
  sellerId?: string | null;
352
- contractType: string;
617
+ paymentMethodId?: string | null;
353
618
  contractNumber: string;
354
619
  title: string;
355
620
  description?: string | null;
621
+ contractType: string;
622
+ totalAmount: number;
623
+ downPayment?: number;
624
+ downPaymentPaid?: number;
625
+ principal?: number | null;
626
+ interestRate?: number | null;
627
+ termMonths?: number | null;
628
+ periodicPayment?: number | null;
629
+ totalPaidToDate?: number;
630
+ totalInterestPaid?: number;
356
631
  status?: string;
632
+ state?: string;
633
+ currentPhaseId?: string | null;
634
+ nextPaymentDueDate?: Date | string | null;
635
+ lastReminderSentAt?: Date | string | null;
357
636
  startDate?: Date | string | null;
358
637
  endDate?: Date | string | null;
359
638
  signedAt?: Date | string | null;
360
639
  terminatedAt?: Date | string | null;
361
640
  createdAt?: Date | string;
362
641
  updatedAt?: Date | string;
642
+ phases?: Prisma.ContractPhaseUncheckedCreateNestedManyWithoutContractInput;
363
643
  documents?: Prisma.ContractDocumentUncheckedCreateNestedManyWithoutContractInput;
644
+ payments?: Prisma.ContractPaymentUncheckedCreateNestedManyWithoutContractInput;
645
+ transitions?: Prisma.ContractTransitionUncheckedCreateNestedManyWithoutContractInput;
646
+ events?: Prisma.ContractEventUncheckedCreateNestedManyWithoutContractInput;
364
647
  };
365
648
  export type ContractUpdateInput = {
366
649
  id?: Prisma.StringFieldUpdateOperationsInput | string;
367
- contractType?: Prisma.StringFieldUpdateOperationsInput | string;
368
650
  contractNumber?: Prisma.StringFieldUpdateOperationsInput | string;
369
651
  title?: Prisma.StringFieldUpdateOperationsInput | string;
370
652
  description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
653
+ contractType?: Prisma.StringFieldUpdateOperationsInput | string;
654
+ totalAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
655
+ downPayment?: Prisma.FloatFieldUpdateOperationsInput | number;
656
+ downPaymentPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
657
+ principal?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
658
+ interestRate?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
659
+ termMonths?: Prisma.NullableIntFieldUpdateOperationsInput | number | null;
660
+ periodicPayment?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
661
+ totalPaidToDate?: Prisma.FloatFieldUpdateOperationsInput | number;
662
+ totalInterestPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
371
663
  status?: Prisma.StringFieldUpdateOperationsInput | string;
664
+ state?: Prisma.StringFieldUpdateOperationsInput | string;
665
+ currentPhaseId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
666
+ nextPaymentDueDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
667
+ lastReminderSentAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
372
668
  startDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
373
669
  endDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
374
670
  signedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
375
671
  terminatedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
376
672
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
377
673
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
378
- property?: Prisma.PropertyUpdateOneRequiredWithoutContractsNestedInput;
379
- paymentPlan?: Prisma.PaymentPlanUpdateOneWithoutContractNestedInput;
380
- buyer?: Prisma.UserUpdateOneWithoutContractsNestedInput;
674
+ tenant?: Prisma.TenantUpdateOneRequiredWithoutContractsNestedInput;
675
+ propertyUnit?: Prisma.PropertyUnitUpdateOneRequiredWithoutContractsNestedInput;
676
+ buyer?: Prisma.UserUpdateOneRequiredWithoutContractsNestedInput;
381
677
  seller?: Prisma.UserUpdateOneWithoutSoldContractsNestedInput;
678
+ paymentMethod?: Prisma.PropertyPaymentMethodUpdateOneWithoutContractsNestedInput;
679
+ phases?: Prisma.ContractPhaseUpdateManyWithoutContractNestedInput;
382
680
  documents?: Prisma.ContractDocumentUpdateManyWithoutContractNestedInput;
681
+ payments?: Prisma.ContractPaymentUpdateManyWithoutContractNestedInput;
682
+ transitions?: Prisma.ContractTransitionUpdateManyWithoutContractNestedInput;
683
+ events?: Prisma.ContractEventUpdateManyWithoutContractNestedInput;
383
684
  };
384
685
  export type ContractUncheckedUpdateInput = {
385
686
  id?: Prisma.StringFieldUpdateOperationsInput | string;
386
- propertyId?: Prisma.StringFieldUpdateOperationsInput | string;
387
- paymentPlanId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
388
- buyerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
687
+ tenantId?: Prisma.StringFieldUpdateOperationsInput | string;
688
+ propertyUnitId?: Prisma.StringFieldUpdateOperationsInput | string;
689
+ buyerId?: Prisma.StringFieldUpdateOperationsInput | string;
389
690
  sellerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
390
- contractType?: Prisma.StringFieldUpdateOperationsInput | string;
691
+ paymentMethodId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
391
692
  contractNumber?: Prisma.StringFieldUpdateOperationsInput | string;
392
693
  title?: Prisma.StringFieldUpdateOperationsInput | string;
393
694
  description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
695
+ contractType?: Prisma.StringFieldUpdateOperationsInput | string;
696
+ totalAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
697
+ downPayment?: Prisma.FloatFieldUpdateOperationsInput | number;
698
+ downPaymentPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
699
+ principal?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
700
+ interestRate?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
701
+ termMonths?: Prisma.NullableIntFieldUpdateOperationsInput | number | null;
702
+ periodicPayment?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
703
+ totalPaidToDate?: Prisma.FloatFieldUpdateOperationsInput | number;
704
+ totalInterestPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
394
705
  status?: Prisma.StringFieldUpdateOperationsInput | string;
706
+ state?: Prisma.StringFieldUpdateOperationsInput | string;
707
+ currentPhaseId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
708
+ nextPaymentDueDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
709
+ lastReminderSentAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
395
710
  startDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
396
711
  endDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
397
712
  signedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
398
713
  terminatedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
399
714
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
400
715
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
716
+ phases?: Prisma.ContractPhaseUncheckedUpdateManyWithoutContractNestedInput;
401
717
  documents?: Prisma.ContractDocumentUncheckedUpdateManyWithoutContractNestedInput;
718
+ payments?: Prisma.ContractPaymentUncheckedUpdateManyWithoutContractNestedInput;
719
+ transitions?: Prisma.ContractTransitionUncheckedUpdateManyWithoutContractNestedInput;
720
+ events?: Prisma.ContractEventUncheckedUpdateManyWithoutContractNestedInput;
402
721
  };
403
722
  export type ContractCreateManyInput = {
404
723
  id?: string;
405
- propertyId: string;
406
- paymentPlanId?: string | null;
407
- buyerId?: string | null;
724
+ tenantId: string;
725
+ propertyUnitId: string;
726
+ buyerId: string;
408
727
  sellerId?: string | null;
409
- contractType: string;
728
+ paymentMethodId?: string | null;
410
729
  contractNumber: string;
411
730
  title: string;
412
731
  description?: string | null;
732
+ contractType: string;
733
+ totalAmount: number;
734
+ downPayment?: number;
735
+ downPaymentPaid?: number;
736
+ principal?: number | null;
737
+ interestRate?: number | null;
738
+ termMonths?: number | null;
739
+ periodicPayment?: number | null;
740
+ totalPaidToDate?: number;
741
+ totalInterestPaid?: number;
413
742
  status?: string;
743
+ state?: string;
744
+ currentPhaseId?: string | null;
745
+ nextPaymentDueDate?: Date | string | null;
746
+ lastReminderSentAt?: Date | string | null;
414
747
  startDate?: Date | string | null;
415
748
  endDate?: Date | string | null;
416
749
  signedAt?: Date | string | null;
@@ -420,11 +753,24 @@ export type ContractCreateManyInput = {
420
753
  };
421
754
  export type ContractUpdateManyMutationInput = {
422
755
  id?: Prisma.StringFieldUpdateOperationsInput | string;
423
- contractType?: Prisma.StringFieldUpdateOperationsInput | string;
424
756
  contractNumber?: Prisma.StringFieldUpdateOperationsInput | string;
425
757
  title?: Prisma.StringFieldUpdateOperationsInput | string;
426
758
  description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
759
+ contractType?: Prisma.StringFieldUpdateOperationsInput | string;
760
+ totalAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
761
+ downPayment?: Prisma.FloatFieldUpdateOperationsInput | number;
762
+ downPaymentPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
763
+ principal?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
764
+ interestRate?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
765
+ termMonths?: Prisma.NullableIntFieldUpdateOperationsInput | number | null;
766
+ periodicPayment?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
767
+ totalPaidToDate?: Prisma.FloatFieldUpdateOperationsInput | number;
768
+ totalInterestPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
427
769
  status?: Prisma.StringFieldUpdateOperationsInput | string;
770
+ state?: Prisma.StringFieldUpdateOperationsInput | string;
771
+ currentPhaseId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
772
+ nextPaymentDueDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
773
+ lastReminderSentAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
428
774
  startDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
429
775
  endDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
430
776
  signedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
@@ -434,15 +780,29 @@ export type ContractUpdateManyMutationInput = {
434
780
  };
435
781
  export type ContractUncheckedUpdateManyInput = {
436
782
  id?: Prisma.StringFieldUpdateOperationsInput | string;
437
- propertyId?: Prisma.StringFieldUpdateOperationsInput | string;
438
- paymentPlanId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
439
- buyerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
783
+ tenantId?: Prisma.StringFieldUpdateOperationsInput | string;
784
+ propertyUnitId?: Prisma.StringFieldUpdateOperationsInput | string;
785
+ buyerId?: Prisma.StringFieldUpdateOperationsInput | string;
440
786
  sellerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
441
- contractType?: Prisma.StringFieldUpdateOperationsInput | string;
787
+ paymentMethodId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
442
788
  contractNumber?: Prisma.StringFieldUpdateOperationsInput | string;
443
789
  title?: Prisma.StringFieldUpdateOperationsInput | string;
444
790
  description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
791
+ contractType?: Prisma.StringFieldUpdateOperationsInput | string;
792
+ totalAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
793
+ downPayment?: Prisma.FloatFieldUpdateOperationsInput | number;
794
+ downPaymentPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
795
+ principal?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
796
+ interestRate?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
797
+ termMonths?: Prisma.NullableIntFieldUpdateOperationsInput | number | null;
798
+ periodicPayment?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
799
+ totalPaidToDate?: Prisma.FloatFieldUpdateOperationsInput | number;
800
+ totalInterestPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
445
801
  status?: Prisma.StringFieldUpdateOperationsInput | string;
802
+ state?: Prisma.StringFieldUpdateOperationsInput | string;
803
+ currentPhaseId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
804
+ nextPaymentDueDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
805
+ lastReminderSentAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
446
806
  startDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
447
807
  endDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
448
808
  signedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
@@ -458,10 +818,6 @@ export type ContractListRelationFilter = {
458
818
  export type ContractOrderByRelationAggregateInput = {
459
819
  _count?: Prisma.SortOrder;
460
820
  };
461
- export type ContractNullableScalarRelationFilter = {
462
- is?: Prisma.ContractWhereInput | null;
463
- isNot?: Prisma.ContractWhereInput | null;
464
- };
465
821
  export type ContractOrderByRelevanceInput = {
466
822
  fields: Prisma.ContractOrderByRelevanceFieldEnum | Prisma.ContractOrderByRelevanceFieldEnum[];
467
823
  sort: Prisma.SortOrder;
@@ -469,15 +825,29 @@ export type ContractOrderByRelevanceInput = {
469
825
  };
470
826
  export type ContractCountOrderByAggregateInput = {
471
827
  id?: Prisma.SortOrder;
472
- propertyId?: Prisma.SortOrder;
473
- paymentPlanId?: Prisma.SortOrder;
828
+ tenantId?: Prisma.SortOrder;
829
+ propertyUnitId?: Prisma.SortOrder;
474
830
  buyerId?: Prisma.SortOrder;
475
831
  sellerId?: Prisma.SortOrder;
476
- contractType?: Prisma.SortOrder;
832
+ paymentMethodId?: Prisma.SortOrder;
477
833
  contractNumber?: Prisma.SortOrder;
478
834
  title?: Prisma.SortOrder;
479
835
  description?: Prisma.SortOrder;
836
+ contractType?: Prisma.SortOrder;
837
+ totalAmount?: Prisma.SortOrder;
838
+ downPayment?: Prisma.SortOrder;
839
+ downPaymentPaid?: Prisma.SortOrder;
840
+ principal?: Prisma.SortOrder;
841
+ interestRate?: Prisma.SortOrder;
842
+ termMonths?: Prisma.SortOrder;
843
+ periodicPayment?: Prisma.SortOrder;
844
+ totalPaidToDate?: Prisma.SortOrder;
845
+ totalInterestPaid?: Prisma.SortOrder;
480
846
  status?: Prisma.SortOrder;
847
+ state?: Prisma.SortOrder;
848
+ currentPhaseId?: Prisma.SortOrder;
849
+ nextPaymentDueDate?: Prisma.SortOrder;
850
+ lastReminderSentAt?: Prisma.SortOrder;
481
851
  startDate?: Prisma.SortOrder;
482
852
  endDate?: Prisma.SortOrder;
483
853
  signedAt?: Prisma.SortOrder;
@@ -485,17 +855,42 @@ export type ContractCountOrderByAggregateInput = {
485
855
  createdAt?: Prisma.SortOrder;
486
856
  updatedAt?: Prisma.SortOrder;
487
857
  };
858
+ export type ContractAvgOrderByAggregateInput = {
859
+ totalAmount?: Prisma.SortOrder;
860
+ downPayment?: Prisma.SortOrder;
861
+ downPaymentPaid?: Prisma.SortOrder;
862
+ principal?: Prisma.SortOrder;
863
+ interestRate?: Prisma.SortOrder;
864
+ termMonths?: Prisma.SortOrder;
865
+ periodicPayment?: Prisma.SortOrder;
866
+ totalPaidToDate?: Prisma.SortOrder;
867
+ totalInterestPaid?: Prisma.SortOrder;
868
+ };
488
869
  export type ContractMaxOrderByAggregateInput = {
489
870
  id?: Prisma.SortOrder;
490
- propertyId?: Prisma.SortOrder;
491
- paymentPlanId?: Prisma.SortOrder;
871
+ tenantId?: Prisma.SortOrder;
872
+ propertyUnitId?: Prisma.SortOrder;
492
873
  buyerId?: Prisma.SortOrder;
493
874
  sellerId?: Prisma.SortOrder;
494
- contractType?: Prisma.SortOrder;
875
+ paymentMethodId?: Prisma.SortOrder;
495
876
  contractNumber?: Prisma.SortOrder;
496
877
  title?: Prisma.SortOrder;
497
878
  description?: Prisma.SortOrder;
879
+ contractType?: Prisma.SortOrder;
880
+ totalAmount?: Prisma.SortOrder;
881
+ downPayment?: Prisma.SortOrder;
882
+ downPaymentPaid?: Prisma.SortOrder;
883
+ principal?: Prisma.SortOrder;
884
+ interestRate?: Prisma.SortOrder;
885
+ termMonths?: Prisma.SortOrder;
886
+ periodicPayment?: Prisma.SortOrder;
887
+ totalPaidToDate?: Prisma.SortOrder;
888
+ totalInterestPaid?: Prisma.SortOrder;
498
889
  status?: Prisma.SortOrder;
890
+ state?: Prisma.SortOrder;
891
+ currentPhaseId?: Prisma.SortOrder;
892
+ nextPaymentDueDate?: Prisma.SortOrder;
893
+ lastReminderSentAt?: Prisma.SortOrder;
499
894
  startDate?: Prisma.SortOrder;
500
895
  endDate?: Prisma.SortOrder;
501
896
  signedAt?: Prisma.SortOrder;
@@ -505,15 +900,29 @@ export type ContractMaxOrderByAggregateInput = {
505
900
  };
506
901
  export type ContractMinOrderByAggregateInput = {
507
902
  id?: Prisma.SortOrder;
508
- propertyId?: Prisma.SortOrder;
509
- paymentPlanId?: Prisma.SortOrder;
903
+ tenantId?: Prisma.SortOrder;
904
+ propertyUnitId?: Prisma.SortOrder;
510
905
  buyerId?: Prisma.SortOrder;
511
906
  sellerId?: Prisma.SortOrder;
512
- contractType?: Prisma.SortOrder;
907
+ paymentMethodId?: Prisma.SortOrder;
513
908
  contractNumber?: Prisma.SortOrder;
514
909
  title?: Prisma.SortOrder;
515
910
  description?: Prisma.SortOrder;
911
+ contractType?: Prisma.SortOrder;
912
+ totalAmount?: Prisma.SortOrder;
913
+ downPayment?: Prisma.SortOrder;
914
+ downPaymentPaid?: Prisma.SortOrder;
915
+ principal?: Prisma.SortOrder;
916
+ interestRate?: Prisma.SortOrder;
917
+ termMonths?: Prisma.SortOrder;
918
+ periodicPayment?: Prisma.SortOrder;
919
+ totalPaidToDate?: Prisma.SortOrder;
920
+ totalInterestPaid?: Prisma.SortOrder;
516
921
  status?: Prisma.SortOrder;
922
+ state?: Prisma.SortOrder;
923
+ currentPhaseId?: Prisma.SortOrder;
924
+ nextPaymentDueDate?: Prisma.SortOrder;
925
+ lastReminderSentAt?: Prisma.SortOrder;
517
926
  startDate?: Prisma.SortOrder;
518
927
  endDate?: Prisma.SortOrder;
519
928
  signedAt?: Prisma.SortOrder;
@@ -521,6 +930,17 @@ export type ContractMinOrderByAggregateInput = {
521
930
  createdAt?: Prisma.SortOrder;
522
931
  updatedAt?: Prisma.SortOrder;
523
932
  };
933
+ export type ContractSumOrderByAggregateInput = {
934
+ totalAmount?: Prisma.SortOrder;
935
+ downPayment?: Prisma.SortOrder;
936
+ downPaymentPaid?: Prisma.SortOrder;
937
+ principal?: Prisma.SortOrder;
938
+ interestRate?: Prisma.SortOrder;
939
+ termMonths?: Prisma.SortOrder;
940
+ periodicPayment?: Prisma.SortOrder;
941
+ totalPaidToDate?: Prisma.SortOrder;
942
+ totalInterestPaid?: Prisma.SortOrder;
943
+ };
524
944
  export type ContractScalarRelationFilter = {
525
945
  is?: Prisma.ContractWhereInput;
526
946
  isNot?: Prisma.ContractWhereInput;
@@ -601,71 +1021,143 @@ export type ContractUncheckedUpdateManyWithoutSellerNestedInput = {
601
1021
  updateMany?: Prisma.ContractUpdateManyWithWhereWithoutSellerInput | Prisma.ContractUpdateManyWithWhereWithoutSellerInput[];
602
1022
  deleteMany?: Prisma.ContractScalarWhereInput | Prisma.ContractScalarWhereInput[];
603
1023
  };
604
- export type ContractCreateNestedManyWithoutPropertyInput = {
605
- create?: Prisma.XOR<Prisma.ContractCreateWithoutPropertyInput, Prisma.ContractUncheckedCreateWithoutPropertyInput> | Prisma.ContractCreateWithoutPropertyInput[] | Prisma.ContractUncheckedCreateWithoutPropertyInput[];
606
- connectOrCreate?: Prisma.ContractCreateOrConnectWithoutPropertyInput | Prisma.ContractCreateOrConnectWithoutPropertyInput[];
607
- createMany?: Prisma.ContractCreateManyPropertyInputEnvelope;
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;
608
1028
  connect?: Prisma.ContractWhereUniqueInput | Prisma.ContractWhereUniqueInput[];
609
1029
  };
610
- export type ContractUncheckedCreateNestedManyWithoutPropertyInput = {
611
- create?: Prisma.XOR<Prisma.ContractCreateWithoutPropertyInput, Prisma.ContractUncheckedCreateWithoutPropertyInput> | Prisma.ContractCreateWithoutPropertyInput[] | Prisma.ContractUncheckedCreateWithoutPropertyInput[];
612
- connectOrCreate?: Prisma.ContractCreateOrConnectWithoutPropertyInput | Prisma.ContractCreateOrConnectWithoutPropertyInput[];
613
- createMany?: Prisma.ContractCreateManyPropertyInputEnvelope;
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;
614
1034
  connect?: Prisma.ContractWhereUniqueInput | Prisma.ContractWhereUniqueInput[];
615
1035
  };
616
- export type ContractUpdateManyWithoutPropertyNestedInput = {
617
- create?: Prisma.XOR<Prisma.ContractCreateWithoutPropertyInput, Prisma.ContractUncheckedCreateWithoutPropertyInput> | Prisma.ContractCreateWithoutPropertyInput[] | Prisma.ContractUncheckedCreateWithoutPropertyInput[];
618
- connectOrCreate?: Prisma.ContractCreateOrConnectWithoutPropertyInput | Prisma.ContractCreateOrConnectWithoutPropertyInput[];
619
- upsert?: Prisma.ContractUpsertWithWhereUniqueWithoutPropertyInput | Prisma.ContractUpsertWithWhereUniqueWithoutPropertyInput[];
620
- createMany?: Prisma.ContractCreateManyPropertyInputEnvelope;
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;
621
1041
  set?: Prisma.ContractWhereUniqueInput | Prisma.ContractWhereUniqueInput[];
622
1042
  disconnect?: Prisma.ContractWhereUniqueInput | Prisma.ContractWhereUniqueInput[];
623
1043
  delete?: Prisma.ContractWhereUniqueInput | Prisma.ContractWhereUniqueInput[];
624
1044
  connect?: Prisma.ContractWhereUniqueInput | Prisma.ContractWhereUniqueInput[];
625
- update?: Prisma.ContractUpdateWithWhereUniqueWithoutPropertyInput | Prisma.ContractUpdateWithWhereUniqueWithoutPropertyInput[];
626
- updateMany?: Prisma.ContractUpdateManyWithWhereWithoutPropertyInput | Prisma.ContractUpdateManyWithWhereWithoutPropertyInput[];
1045
+ update?: Prisma.ContractUpdateWithWhereUniqueWithoutTenantInput | Prisma.ContractUpdateWithWhereUniqueWithoutTenantInput[];
1046
+ updateMany?: Prisma.ContractUpdateManyWithWhereWithoutTenantInput | Prisma.ContractUpdateManyWithWhereWithoutTenantInput[];
627
1047
  deleteMany?: Prisma.ContractScalarWhereInput | Prisma.ContractScalarWhereInput[];
628
1048
  };
629
- export type ContractUncheckedUpdateManyWithoutPropertyNestedInput = {
630
- create?: Prisma.XOR<Prisma.ContractCreateWithoutPropertyInput, Prisma.ContractUncheckedCreateWithoutPropertyInput> | Prisma.ContractCreateWithoutPropertyInput[] | Prisma.ContractUncheckedCreateWithoutPropertyInput[];
631
- connectOrCreate?: Prisma.ContractCreateOrConnectWithoutPropertyInput | Prisma.ContractCreateOrConnectWithoutPropertyInput[];
632
- upsert?: Prisma.ContractUpsertWithWhereUniqueWithoutPropertyInput | Prisma.ContractUpsertWithWhereUniqueWithoutPropertyInput[];
633
- createMany?: Prisma.ContractCreateManyPropertyInputEnvelope;
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;
634
1054
  set?: Prisma.ContractWhereUniqueInput | Prisma.ContractWhereUniqueInput[];
635
1055
  disconnect?: Prisma.ContractWhereUniqueInput | Prisma.ContractWhereUniqueInput[];
636
1056
  delete?: Prisma.ContractWhereUniqueInput | Prisma.ContractWhereUniqueInput[];
637
1057
  connect?: Prisma.ContractWhereUniqueInput | Prisma.ContractWhereUniqueInput[];
638
- update?: Prisma.ContractUpdateWithWhereUniqueWithoutPropertyInput | Prisma.ContractUpdateWithWhereUniqueWithoutPropertyInput[];
639
- updateMany?: Prisma.ContractUpdateManyWithWhereWithoutPropertyInput | Prisma.ContractUpdateManyWithWhereWithoutPropertyInput[];
1058
+ update?: Prisma.ContractUpdateWithWhereUniqueWithoutTenantInput | Prisma.ContractUpdateWithWhereUniqueWithoutTenantInput[];
1059
+ updateMany?: Prisma.ContractUpdateManyWithWhereWithoutTenantInput | Prisma.ContractUpdateManyWithWhereWithoutTenantInput[];
640
1060
  deleteMany?: Prisma.ContractScalarWhereInput | Prisma.ContractScalarWhereInput[];
641
1061
  };
642
- export type ContractCreateNestedOneWithoutPaymentPlanInput = {
643
- create?: Prisma.XOR<Prisma.ContractCreateWithoutPaymentPlanInput, Prisma.ContractUncheckedCreateWithoutPaymentPlanInput>;
644
- connectOrCreate?: Prisma.ContractCreateOrConnectWithoutPaymentPlanInput;
1062
+ export type ContractCreateNestedManyWithoutPropertyUnitInput = {
1063
+ create?: Prisma.XOR<Prisma.ContractCreateWithoutPropertyUnitInput, Prisma.ContractUncheckedCreateWithoutPropertyUnitInput> | Prisma.ContractCreateWithoutPropertyUnitInput[] | Prisma.ContractUncheckedCreateWithoutPropertyUnitInput[];
1064
+ connectOrCreate?: Prisma.ContractCreateOrConnectWithoutPropertyUnitInput | Prisma.ContractCreateOrConnectWithoutPropertyUnitInput[];
1065
+ createMany?: Prisma.ContractCreateManyPropertyUnitInputEnvelope;
1066
+ connect?: Prisma.ContractWhereUniqueInput | Prisma.ContractWhereUniqueInput[];
1067
+ };
1068
+ export type ContractUncheckedCreateNestedManyWithoutPropertyUnitInput = {
1069
+ create?: Prisma.XOR<Prisma.ContractCreateWithoutPropertyUnitInput, Prisma.ContractUncheckedCreateWithoutPropertyUnitInput> | Prisma.ContractCreateWithoutPropertyUnitInput[] | Prisma.ContractUncheckedCreateWithoutPropertyUnitInput[];
1070
+ connectOrCreate?: Prisma.ContractCreateOrConnectWithoutPropertyUnitInput | Prisma.ContractCreateOrConnectWithoutPropertyUnitInput[];
1071
+ createMany?: Prisma.ContractCreateManyPropertyUnitInputEnvelope;
1072
+ connect?: Prisma.ContractWhereUniqueInput | Prisma.ContractWhereUniqueInput[];
1073
+ };
1074
+ export type ContractUpdateManyWithoutPropertyUnitNestedInput = {
1075
+ create?: Prisma.XOR<Prisma.ContractCreateWithoutPropertyUnitInput, Prisma.ContractUncheckedCreateWithoutPropertyUnitInput> | Prisma.ContractCreateWithoutPropertyUnitInput[] | Prisma.ContractUncheckedCreateWithoutPropertyUnitInput[];
1076
+ connectOrCreate?: Prisma.ContractCreateOrConnectWithoutPropertyUnitInput | Prisma.ContractCreateOrConnectWithoutPropertyUnitInput[];
1077
+ upsert?: Prisma.ContractUpsertWithWhereUniqueWithoutPropertyUnitInput | Prisma.ContractUpsertWithWhereUniqueWithoutPropertyUnitInput[];
1078
+ createMany?: Prisma.ContractCreateManyPropertyUnitInputEnvelope;
1079
+ set?: Prisma.ContractWhereUniqueInput | Prisma.ContractWhereUniqueInput[];
1080
+ disconnect?: Prisma.ContractWhereUniqueInput | Prisma.ContractWhereUniqueInput[];
1081
+ delete?: Prisma.ContractWhereUniqueInput | Prisma.ContractWhereUniqueInput[];
1082
+ connect?: Prisma.ContractWhereUniqueInput | Prisma.ContractWhereUniqueInput[];
1083
+ update?: Prisma.ContractUpdateWithWhereUniqueWithoutPropertyUnitInput | Prisma.ContractUpdateWithWhereUniqueWithoutPropertyUnitInput[];
1084
+ updateMany?: Prisma.ContractUpdateManyWithWhereWithoutPropertyUnitInput | Prisma.ContractUpdateManyWithWhereWithoutPropertyUnitInput[];
1085
+ deleteMany?: Prisma.ContractScalarWhereInput | Prisma.ContractScalarWhereInput[];
1086
+ };
1087
+ export type ContractUncheckedUpdateManyWithoutPropertyUnitNestedInput = {
1088
+ create?: Prisma.XOR<Prisma.ContractCreateWithoutPropertyUnitInput, Prisma.ContractUncheckedCreateWithoutPropertyUnitInput> | Prisma.ContractCreateWithoutPropertyUnitInput[] | Prisma.ContractUncheckedCreateWithoutPropertyUnitInput[];
1089
+ connectOrCreate?: Prisma.ContractCreateOrConnectWithoutPropertyUnitInput | Prisma.ContractCreateOrConnectWithoutPropertyUnitInput[];
1090
+ upsert?: Prisma.ContractUpsertWithWhereUniqueWithoutPropertyUnitInput | Prisma.ContractUpsertWithWhereUniqueWithoutPropertyUnitInput[];
1091
+ createMany?: Prisma.ContractCreateManyPropertyUnitInputEnvelope;
1092
+ set?: Prisma.ContractWhereUniqueInput | Prisma.ContractWhereUniqueInput[];
1093
+ disconnect?: Prisma.ContractWhereUniqueInput | Prisma.ContractWhereUniqueInput[];
1094
+ delete?: Prisma.ContractWhereUniqueInput | Prisma.ContractWhereUniqueInput[];
1095
+ connect?: Prisma.ContractWhereUniqueInput | Prisma.ContractWhereUniqueInput[];
1096
+ update?: Prisma.ContractUpdateWithWhereUniqueWithoutPropertyUnitInput | Prisma.ContractUpdateWithWhereUniqueWithoutPropertyUnitInput[];
1097
+ updateMany?: Prisma.ContractUpdateManyWithWhereWithoutPropertyUnitInput | Prisma.ContractUpdateManyWithWhereWithoutPropertyUnitInput[];
1098
+ deleteMany?: Prisma.ContractScalarWhereInput | Prisma.ContractScalarWhereInput[];
1099
+ };
1100
+ export type ContractCreateNestedManyWithoutPaymentMethodInput = {
1101
+ create?: Prisma.XOR<Prisma.ContractCreateWithoutPaymentMethodInput, Prisma.ContractUncheckedCreateWithoutPaymentMethodInput> | Prisma.ContractCreateWithoutPaymentMethodInput[] | Prisma.ContractUncheckedCreateWithoutPaymentMethodInput[];
1102
+ connectOrCreate?: Prisma.ContractCreateOrConnectWithoutPaymentMethodInput | Prisma.ContractCreateOrConnectWithoutPaymentMethodInput[];
1103
+ createMany?: Prisma.ContractCreateManyPaymentMethodInputEnvelope;
1104
+ connect?: Prisma.ContractWhereUniqueInput | Prisma.ContractWhereUniqueInput[];
1105
+ };
1106
+ export type ContractUncheckedCreateNestedManyWithoutPaymentMethodInput = {
1107
+ create?: Prisma.XOR<Prisma.ContractCreateWithoutPaymentMethodInput, Prisma.ContractUncheckedCreateWithoutPaymentMethodInput> | Prisma.ContractCreateWithoutPaymentMethodInput[] | Prisma.ContractUncheckedCreateWithoutPaymentMethodInput[];
1108
+ connectOrCreate?: Prisma.ContractCreateOrConnectWithoutPaymentMethodInput | Prisma.ContractCreateOrConnectWithoutPaymentMethodInput[];
1109
+ createMany?: Prisma.ContractCreateManyPaymentMethodInputEnvelope;
1110
+ connect?: Prisma.ContractWhereUniqueInput | Prisma.ContractWhereUniqueInput[];
1111
+ };
1112
+ export type ContractUpdateManyWithoutPaymentMethodNestedInput = {
1113
+ create?: Prisma.XOR<Prisma.ContractCreateWithoutPaymentMethodInput, Prisma.ContractUncheckedCreateWithoutPaymentMethodInput> | Prisma.ContractCreateWithoutPaymentMethodInput[] | Prisma.ContractUncheckedCreateWithoutPaymentMethodInput[];
1114
+ connectOrCreate?: Prisma.ContractCreateOrConnectWithoutPaymentMethodInput | Prisma.ContractCreateOrConnectWithoutPaymentMethodInput[];
1115
+ upsert?: Prisma.ContractUpsertWithWhereUniqueWithoutPaymentMethodInput | Prisma.ContractUpsertWithWhereUniqueWithoutPaymentMethodInput[];
1116
+ createMany?: Prisma.ContractCreateManyPaymentMethodInputEnvelope;
1117
+ set?: Prisma.ContractWhereUniqueInput | Prisma.ContractWhereUniqueInput[];
1118
+ disconnect?: Prisma.ContractWhereUniqueInput | Prisma.ContractWhereUniqueInput[];
1119
+ delete?: Prisma.ContractWhereUniqueInput | Prisma.ContractWhereUniqueInput[];
1120
+ connect?: Prisma.ContractWhereUniqueInput | Prisma.ContractWhereUniqueInput[];
1121
+ update?: Prisma.ContractUpdateWithWhereUniqueWithoutPaymentMethodInput | Prisma.ContractUpdateWithWhereUniqueWithoutPaymentMethodInput[];
1122
+ updateMany?: Prisma.ContractUpdateManyWithWhereWithoutPaymentMethodInput | Prisma.ContractUpdateManyWithWhereWithoutPaymentMethodInput[];
1123
+ deleteMany?: Prisma.ContractScalarWhereInput | Prisma.ContractScalarWhereInput[];
1124
+ };
1125
+ export type ContractUncheckedUpdateManyWithoutPaymentMethodNestedInput = {
1126
+ create?: Prisma.XOR<Prisma.ContractCreateWithoutPaymentMethodInput, Prisma.ContractUncheckedCreateWithoutPaymentMethodInput> | Prisma.ContractCreateWithoutPaymentMethodInput[] | Prisma.ContractUncheckedCreateWithoutPaymentMethodInput[];
1127
+ connectOrCreate?: Prisma.ContractCreateOrConnectWithoutPaymentMethodInput | Prisma.ContractCreateOrConnectWithoutPaymentMethodInput[];
1128
+ upsert?: Prisma.ContractUpsertWithWhereUniqueWithoutPaymentMethodInput | Prisma.ContractUpsertWithWhereUniqueWithoutPaymentMethodInput[];
1129
+ createMany?: Prisma.ContractCreateManyPaymentMethodInputEnvelope;
1130
+ set?: Prisma.ContractWhereUniqueInput | Prisma.ContractWhereUniqueInput[];
1131
+ disconnect?: Prisma.ContractWhereUniqueInput | Prisma.ContractWhereUniqueInput[];
1132
+ delete?: Prisma.ContractWhereUniqueInput | Prisma.ContractWhereUniqueInput[];
1133
+ connect?: Prisma.ContractWhereUniqueInput | Prisma.ContractWhereUniqueInput[];
1134
+ update?: Prisma.ContractUpdateWithWhereUniqueWithoutPaymentMethodInput | Prisma.ContractUpdateWithWhereUniqueWithoutPaymentMethodInput[];
1135
+ updateMany?: Prisma.ContractUpdateManyWithWhereWithoutPaymentMethodInput | Prisma.ContractUpdateManyWithWhereWithoutPaymentMethodInput[];
1136
+ deleteMany?: Prisma.ContractScalarWhereInput | Prisma.ContractScalarWhereInput[];
1137
+ };
1138
+ export type ContractCreateNestedOneWithoutPhasesInput = {
1139
+ create?: Prisma.XOR<Prisma.ContractCreateWithoutPhasesInput, Prisma.ContractUncheckedCreateWithoutPhasesInput>;
1140
+ connectOrCreate?: Prisma.ContractCreateOrConnectWithoutPhasesInput;
645
1141
  connect?: Prisma.ContractWhereUniqueInput;
646
1142
  };
647
- export type ContractUncheckedCreateNestedOneWithoutPaymentPlanInput = {
648
- create?: Prisma.XOR<Prisma.ContractCreateWithoutPaymentPlanInput, Prisma.ContractUncheckedCreateWithoutPaymentPlanInput>;
649
- connectOrCreate?: Prisma.ContractCreateOrConnectWithoutPaymentPlanInput;
1143
+ export type ContractUpdateOneRequiredWithoutPhasesNestedInput = {
1144
+ create?: Prisma.XOR<Prisma.ContractCreateWithoutPhasesInput, Prisma.ContractUncheckedCreateWithoutPhasesInput>;
1145
+ connectOrCreate?: Prisma.ContractCreateOrConnectWithoutPhasesInput;
1146
+ upsert?: Prisma.ContractUpsertWithoutPhasesInput;
650
1147
  connect?: Prisma.ContractWhereUniqueInput;
1148
+ update?: Prisma.XOR<Prisma.XOR<Prisma.ContractUpdateToOneWithWhereWithoutPhasesInput, Prisma.ContractUpdateWithoutPhasesInput>, Prisma.ContractUncheckedUpdateWithoutPhasesInput>;
651
1149
  };
652
- export type ContractUpdateOneWithoutPaymentPlanNestedInput = {
653
- create?: Prisma.XOR<Prisma.ContractCreateWithoutPaymentPlanInput, Prisma.ContractUncheckedCreateWithoutPaymentPlanInput>;
654
- connectOrCreate?: Prisma.ContractCreateOrConnectWithoutPaymentPlanInput;
655
- upsert?: Prisma.ContractUpsertWithoutPaymentPlanInput;
656
- disconnect?: Prisma.ContractWhereInput | boolean;
657
- delete?: Prisma.ContractWhereInput | boolean;
1150
+ export type ContractCreateNestedOneWithoutPaymentsInput = {
1151
+ create?: Prisma.XOR<Prisma.ContractCreateWithoutPaymentsInput, Prisma.ContractUncheckedCreateWithoutPaymentsInput>;
1152
+ connectOrCreate?: Prisma.ContractCreateOrConnectWithoutPaymentsInput;
658
1153
  connect?: Prisma.ContractWhereUniqueInput;
659
- update?: Prisma.XOR<Prisma.XOR<Prisma.ContractUpdateToOneWithWhereWithoutPaymentPlanInput, Prisma.ContractUpdateWithoutPaymentPlanInput>, Prisma.ContractUncheckedUpdateWithoutPaymentPlanInput>;
660
- };
661
- export type ContractUncheckedUpdateOneWithoutPaymentPlanNestedInput = {
662
- create?: Prisma.XOR<Prisma.ContractCreateWithoutPaymentPlanInput, Prisma.ContractUncheckedCreateWithoutPaymentPlanInput>;
663
- connectOrCreate?: Prisma.ContractCreateOrConnectWithoutPaymentPlanInput;
664
- upsert?: Prisma.ContractUpsertWithoutPaymentPlanInput;
665
- disconnect?: Prisma.ContractWhereInput | boolean;
666
- delete?: Prisma.ContractWhereInput | boolean;
1154
+ };
1155
+ export type ContractUpdateOneRequiredWithoutPaymentsNestedInput = {
1156
+ create?: Prisma.XOR<Prisma.ContractCreateWithoutPaymentsInput, Prisma.ContractUncheckedCreateWithoutPaymentsInput>;
1157
+ connectOrCreate?: Prisma.ContractCreateOrConnectWithoutPaymentsInput;
1158
+ upsert?: Prisma.ContractUpsertWithoutPaymentsInput;
667
1159
  connect?: Prisma.ContractWhereUniqueInput;
668
- update?: Prisma.XOR<Prisma.XOR<Prisma.ContractUpdateToOneWithWhereWithoutPaymentPlanInput, Prisma.ContractUpdateWithoutPaymentPlanInput>, Prisma.ContractUncheckedUpdateWithoutPaymentPlanInput>;
1160
+ update?: Prisma.XOR<Prisma.XOR<Prisma.ContractUpdateToOneWithWhereWithoutPaymentsInput, Prisma.ContractUpdateWithoutPaymentsInput>, Prisma.ContractUncheckedUpdateWithoutPaymentsInput>;
669
1161
  };
670
1162
  export type ContractCreateNestedOneWithoutDocumentsInput = {
671
1163
  create?: Prisma.XOR<Prisma.ContractCreateWithoutDocumentsInput, Prisma.ContractUncheckedCreateWithoutDocumentsInput>;
@@ -679,41 +1171,101 @@ export type ContractUpdateOneRequiredWithoutDocumentsNestedInput = {
679
1171
  connect?: Prisma.ContractWhereUniqueInput;
680
1172
  update?: Prisma.XOR<Prisma.XOR<Prisma.ContractUpdateToOneWithWhereWithoutDocumentsInput, Prisma.ContractUpdateWithoutDocumentsInput>, Prisma.ContractUncheckedUpdateWithoutDocumentsInput>;
681
1173
  };
1174
+ export type ContractCreateNestedOneWithoutTransitionsInput = {
1175
+ create?: Prisma.XOR<Prisma.ContractCreateWithoutTransitionsInput, Prisma.ContractUncheckedCreateWithoutTransitionsInput>;
1176
+ connectOrCreate?: Prisma.ContractCreateOrConnectWithoutTransitionsInput;
1177
+ connect?: Prisma.ContractWhereUniqueInput;
1178
+ };
1179
+ export type ContractUpdateOneRequiredWithoutTransitionsNestedInput = {
1180
+ create?: Prisma.XOR<Prisma.ContractCreateWithoutTransitionsInput, Prisma.ContractUncheckedCreateWithoutTransitionsInput>;
1181
+ connectOrCreate?: Prisma.ContractCreateOrConnectWithoutTransitionsInput;
1182
+ upsert?: Prisma.ContractUpsertWithoutTransitionsInput;
1183
+ connect?: Prisma.ContractWhereUniqueInput;
1184
+ update?: Prisma.XOR<Prisma.XOR<Prisma.ContractUpdateToOneWithWhereWithoutTransitionsInput, Prisma.ContractUpdateWithoutTransitionsInput>, Prisma.ContractUncheckedUpdateWithoutTransitionsInput>;
1185
+ };
1186
+ export type ContractCreateNestedOneWithoutEventsInput = {
1187
+ create?: Prisma.XOR<Prisma.ContractCreateWithoutEventsInput, Prisma.ContractUncheckedCreateWithoutEventsInput>;
1188
+ connectOrCreate?: Prisma.ContractCreateOrConnectWithoutEventsInput;
1189
+ connect?: Prisma.ContractWhereUniqueInput;
1190
+ };
1191
+ export type ContractUpdateOneRequiredWithoutEventsNestedInput = {
1192
+ create?: Prisma.XOR<Prisma.ContractCreateWithoutEventsInput, Prisma.ContractUncheckedCreateWithoutEventsInput>;
1193
+ connectOrCreate?: Prisma.ContractCreateOrConnectWithoutEventsInput;
1194
+ upsert?: Prisma.ContractUpsertWithoutEventsInput;
1195
+ connect?: Prisma.ContractWhereUniqueInput;
1196
+ update?: Prisma.XOR<Prisma.XOR<Prisma.ContractUpdateToOneWithWhereWithoutEventsInput, Prisma.ContractUpdateWithoutEventsInput>, Prisma.ContractUncheckedUpdateWithoutEventsInput>;
1197
+ };
682
1198
  export type ContractCreateWithoutBuyerInput = {
683
1199
  id?: string;
684
- contractType: string;
685
1200
  contractNumber: string;
686
1201
  title: string;
687
1202
  description?: string | null;
1203
+ contractType: string;
1204
+ totalAmount: number;
1205
+ downPayment?: number;
1206
+ downPaymentPaid?: number;
1207
+ principal?: number | null;
1208
+ interestRate?: number | null;
1209
+ termMonths?: number | null;
1210
+ periodicPayment?: number | null;
1211
+ totalPaidToDate?: number;
1212
+ totalInterestPaid?: number;
688
1213
  status?: string;
1214
+ state?: string;
1215
+ currentPhaseId?: string | null;
1216
+ nextPaymentDueDate?: Date | string | null;
1217
+ lastReminderSentAt?: Date | string | null;
689
1218
  startDate?: Date | string | null;
690
1219
  endDate?: Date | string | null;
691
1220
  signedAt?: Date | string | null;
692
1221
  terminatedAt?: Date | string | null;
693
1222
  createdAt?: Date | string;
694
1223
  updatedAt?: Date | string;
695
- property: Prisma.PropertyCreateNestedOneWithoutContractsInput;
696
- paymentPlan?: Prisma.PaymentPlanCreateNestedOneWithoutContractInput;
1224
+ tenant: Prisma.TenantCreateNestedOneWithoutContractsInput;
1225
+ propertyUnit: Prisma.PropertyUnitCreateNestedOneWithoutContractsInput;
697
1226
  seller?: Prisma.UserCreateNestedOneWithoutSoldContractsInput;
1227
+ paymentMethod?: Prisma.PropertyPaymentMethodCreateNestedOneWithoutContractsInput;
1228
+ phases?: Prisma.ContractPhaseCreateNestedManyWithoutContractInput;
698
1229
  documents?: Prisma.ContractDocumentCreateNestedManyWithoutContractInput;
1230
+ payments?: Prisma.ContractPaymentCreateNestedManyWithoutContractInput;
1231
+ transitions?: Prisma.ContractTransitionCreateNestedManyWithoutContractInput;
1232
+ events?: Prisma.ContractEventCreateNestedManyWithoutContractInput;
699
1233
  };
700
1234
  export type ContractUncheckedCreateWithoutBuyerInput = {
701
1235
  id?: string;
702
- propertyId: string;
703
- paymentPlanId?: string | null;
1236
+ tenantId: string;
1237
+ propertyUnitId: string;
704
1238
  sellerId?: string | null;
705
- contractType: string;
1239
+ paymentMethodId?: string | null;
706
1240
  contractNumber: string;
707
1241
  title: string;
708
1242
  description?: string | null;
1243
+ contractType: string;
1244
+ totalAmount: number;
1245
+ downPayment?: number;
1246
+ downPaymentPaid?: number;
1247
+ principal?: number | null;
1248
+ interestRate?: number | null;
1249
+ termMonths?: number | null;
1250
+ periodicPayment?: number | null;
1251
+ totalPaidToDate?: number;
1252
+ totalInterestPaid?: number;
709
1253
  status?: string;
1254
+ state?: string;
1255
+ currentPhaseId?: string | null;
1256
+ nextPaymentDueDate?: Date | string | null;
1257
+ lastReminderSentAt?: Date | string | null;
710
1258
  startDate?: Date | string | null;
711
1259
  endDate?: Date | string | null;
712
1260
  signedAt?: Date | string | null;
713
1261
  terminatedAt?: Date | string | null;
714
1262
  createdAt?: Date | string;
715
1263
  updatedAt?: Date | string;
1264
+ phases?: Prisma.ContractPhaseUncheckedCreateNestedManyWithoutContractInput;
716
1265
  documents?: Prisma.ContractDocumentUncheckedCreateNestedManyWithoutContractInput;
1266
+ payments?: Prisma.ContractPaymentUncheckedCreateNestedManyWithoutContractInput;
1267
+ transitions?: Prisma.ContractTransitionUncheckedCreateNestedManyWithoutContractInput;
1268
+ events?: Prisma.ContractEventUncheckedCreateNestedManyWithoutContractInput;
717
1269
  };
718
1270
  export type ContractCreateOrConnectWithoutBuyerInput = {
719
1271
  where: Prisma.ContractWhereUniqueInput;
@@ -725,39 +1277,75 @@ export type ContractCreateManyBuyerInputEnvelope = {
725
1277
  };
726
1278
  export type ContractCreateWithoutSellerInput = {
727
1279
  id?: string;
728
- contractType: string;
729
1280
  contractNumber: string;
730
1281
  title: string;
731
1282
  description?: string | null;
1283
+ contractType: string;
1284
+ totalAmount: number;
1285
+ downPayment?: number;
1286
+ downPaymentPaid?: number;
1287
+ principal?: number | null;
1288
+ interestRate?: number | null;
1289
+ termMonths?: number | null;
1290
+ periodicPayment?: number | null;
1291
+ totalPaidToDate?: number;
1292
+ totalInterestPaid?: number;
732
1293
  status?: string;
1294
+ state?: string;
1295
+ currentPhaseId?: string | null;
1296
+ nextPaymentDueDate?: Date | string | null;
1297
+ lastReminderSentAt?: Date | string | null;
733
1298
  startDate?: Date | string | null;
734
1299
  endDate?: Date | string | null;
735
1300
  signedAt?: Date | string | null;
736
1301
  terminatedAt?: Date | string | null;
737
1302
  createdAt?: Date | string;
738
1303
  updatedAt?: Date | string;
739
- property: Prisma.PropertyCreateNestedOneWithoutContractsInput;
740
- paymentPlan?: Prisma.PaymentPlanCreateNestedOneWithoutContractInput;
741
- buyer?: Prisma.UserCreateNestedOneWithoutContractsInput;
1304
+ tenant: Prisma.TenantCreateNestedOneWithoutContractsInput;
1305
+ propertyUnit: Prisma.PropertyUnitCreateNestedOneWithoutContractsInput;
1306
+ buyer: Prisma.UserCreateNestedOneWithoutContractsInput;
1307
+ paymentMethod?: Prisma.PropertyPaymentMethodCreateNestedOneWithoutContractsInput;
1308
+ phases?: Prisma.ContractPhaseCreateNestedManyWithoutContractInput;
742
1309
  documents?: Prisma.ContractDocumentCreateNestedManyWithoutContractInput;
1310
+ payments?: Prisma.ContractPaymentCreateNestedManyWithoutContractInput;
1311
+ transitions?: Prisma.ContractTransitionCreateNestedManyWithoutContractInput;
1312
+ events?: Prisma.ContractEventCreateNestedManyWithoutContractInput;
743
1313
  };
744
1314
  export type ContractUncheckedCreateWithoutSellerInput = {
745
1315
  id?: string;
746
- propertyId: string;
747
- paymentPlanId?: string | null;
748
- buyerId?: string | null;
749
- contractType: string;
1316
+ tenantId: string;
1317
+ propertyUnitId: string;
1318
+ buyerId: string;
1319
+ paymentMethodId?: string | null;
750
1320
  contractNumber: string;
751
1321
  title: string;
752
1322
  description?: string | null;
1323
+ contractType: string;
1324
+ totalAmount: number;
1325
+ downPayment?: number;
1326
+ downPaymentPaid?: number;
1327
+ principal?: number | null;
1328
+ interestRate?: number | null;
1329
+ termMonths?: number | null;
1330
+ periodicPayment?: number | null;
1331
+ totalPaidToDate?: number;
1332
+ totalInterestPaid?: number;
753
1333
  status?: string;
1334
+ state?: string;
1335
+ currentPhaseId?: string | null;
1336
+ nextPaymentDueDate?: Date | string | null;
1337
+ lastReminderSentAt?: Date | string | null;
754
1338
  startDate?: Date | string | null;
755
1339
  endDate?: Date | string | null;
756
1340
  signedAt?: Date | string | null;
757
1341
  terminatedAt?: Date | string | null;
758
1342
  createdAt?: Date | string;
759
1343
  updatedAt?: Date | string;
1344
+ phases?: Prisma.ContractPhaseUncheckedCreateNestedManyWithoutContractInput;
760
1345
  documents?: Prisma.ContractDocumentUncheckedCreateNestedManyWithoutContractInput;
1346
+ payments?: Prisma.ContractPaymentUncheckedCreateNestedManyWithoutContractInput;
1347
+ transitions?: Prisma.ContractTransitionUncheckedCreateNestedManyWithoutContractInput;
1348
+ events?: Prisma.ContractEventUncheckedCreateNestedManyWithoutContractInput;
761
1349
  };
762
1350
  export type ContractCreateOrConnectWithoutSellerInput = {
763
1351
  where: Prisma.ContractWhereUniqueInput;
@@ -785,15 +1373,29 @@ export type ContractScalarWhereInput = {
785
1373
  OR?: Prisma.ContractScalarWhereInput[];
786
1374
  NOT?: Prisma.ContractScalarWhereInput | Prisma.ContractScalarWhereInput[];
787
1375
  id?: Prisma.StringFilter<"Contract"> | string;
788
- propertyId?: Prisma.StringFilter<"Contract"> | string;
789
- paymentPlanId?: Prisma.StringNullableFilter<"Contract"> | string | null;
790
- buyerId?: Prisma.StringNullableFilter<"Contract"> | string | null;
1376
+ tenantId?: Prisma.StringFilter<"Contract"> | string;
1377
+ propertyUnitId?: Prisma.StringFilter<"Contract"> | string;
1378
+ buyerId?: Prisma.StringFilter<"Contract"> | string;
791
1379
  sellerId?: Prisma.StringNullableFilter<"Contract"> | string | null;
792
- contractType?: Prisma.StringFilter<"Contract"> | string;
1380
+ paymentMethodId?: Prisma.StringNullableFilter<"Contract"> | string | null;
793
1381
  contractNumber?: Prisma.StringFilter<"Contract"> | string;
794
1382
  title?: Prisma.StringFilter<"Contract"> | string;
795
1383
  description?: Prisma.StringNullableFilter<"Contract"> | string | null;
1384
+ contractType?: Prisma.StringFilter<"Contract"> | string;
1385
+ totalAmount?: Prisma.FloatFilter<"Contract"> | number;
1386
+ downPayment?: Prisma.FloatFilter<"Contract"> | number;
1387
+ downPaymentPaid?: Prisma.FloatFilter<"Contract"> | number;
1388
+ principal?: Prisma.FloatNullableFilter<"Contract"> | number | null;
1389
+ interestRate?: Prisma.FloatNullableFilter<"Contract"> | number | null;
1390
+ termMonths?: Prisma.IntNullableFilter<"Contract"> | number | null;
1391
+ periodicPayment?: Prisma.FloatNullableFilter<"Contract"> | number | null;
1392
+ totalPaidToDate?: Prisma.FloatFilter<"Contract"> | number;
1393
+ totalInterestPaid?: Prisma.FloatFilter<"Contract"> | number;
796
1394
  status?: Prisma.StringFilter<"Contract"> | string;
1395
+ state?: Prisma.StringFilter<"Contract"> | string;
1396
+ currentPhaseId?: Prisma.StringNullableFilter<"Contract"> | string | null;
1397
+ nextPaymentDueDate?: Prisma.DateTimeNullableFilter<"Contract"> | Date | string | null;
1398
+ lastReminderSentAt?: Prisma.DateTimeNullableFilter<"Contract"> | Date | string | null;
797
1399
  startDate?: Prisma.DateTimeNullableFilter<"Contract"> | Date | string | null;
798
1400
  endDate?: Prisma.DateTimeNullableFilter<"Contract"> | Date | string | null;
799
1401
  signedAt?: Prisma.DateTimeNullableFilter<"Contract"> | Date | string | null;
@@ -814,243 +1416,1094 @@ export type ContractUpdateManyWithWhereWithoutSellerInput = {
814
1416
  where: Prisma.ContractScalarWhereInput;
815
1417
  data: Prisma.XOR<Prisma.ContractUpdateManyMutationInput, Prisma.ContractUncheckedUpdateManyWithoutSellerInput>;
816
1418
  };
817
- export type ContractCreateWithoutPropertyInput = {
1419
+ export type ContractCreateWithoutTenantInput = {
818
1420
  id?: string;
1421
+ contractNumber: string;
1422
+ title: string;
1423
+ description?: string | null;
819
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
+ };
1512
+ export type ContractCreateWithoutPropertyUnitInput = {
1513
+ id?: string;
820
1514
  contractNumber: string;
821
1515
  title: string;
822
1516
  description?: string | null;
1517
+ contractType: string;
1518
+ totalAmount: number;
1519
+ downPayment?: number;
1520
+ downPaymentPaid?: number;
1521
+ principal?: number | null;
1522
+ interestRate?: number | null;
1523
+ termMonths?: number | null;
1524
+ periodicPayment?: number | null;
1525
+ totalPaidToDate?: number;
1526
+ totalInterestPaid?: number;
823
1527
  status?: string;
1528
+ state?: string;
1529
+ currentPhaseId?: string | null;
1530
+ nextPaymentDueDate?: Date | string | null;
1531
+ lastReminderSentAt?: Date | string | null;
824
1532
  startDate?: Date | string | null;
825
1533
  endDate?: Date | string | null;
826
1534
  signedAt?: Date | string | null;
827
1535
  terminatedAt?: Date | string | null;
828
1536
  createdAt?: Date | string;
829
1537
  updatedAt?: Date | string;
830
- paymentPlan?: Prisma.PaymentPlanCreateNestedOneWithoutContractInput;
831
- buyer?: Prisma.UserCreateNestedOneWithoutContractsInput;
1538
+ tenant: Prisma.TenantCreateNestedOneWithoutContractsInput;
1539
+ buyer: Prisma.UserCreateNestedOneWithoutContractsInput;
832
1540
  seller?: Prisma.UserCreateNestedOneWithoutSoldContractsInput;
1541
+ paymentMethod?: Prisma.PropertyPaymentMethodCreateNestedOneWithoutContractsInput;
1542
+ phases?: Prisma.ContractPhaseCreateNestedManyWithoutContractInput;
833
1543
  documents?: Prisma.ContractDocumentCreateNestedManyWithoutContractInput;
1544
+ payments?: Prisma.ContractPaymentCreateNestedManyWithoutContractInput;
1545
+ transitions?: Prisma.ContractTransitionCreateNestedManyWithoutContractInput;
1546
+ events?: Prisma.ContractEventCreateNestedManyWithoutContractInput;
834
1547
  };
835
- export type ContractUncheckedCreateWithoutPropertyInput = {
1548
+ export type ContractUncheckedCreateWithoutPropertyUnitInput = {
836
1549
  id?: string;
837
- paymentPlanId?: string | null;
838
- buyerId?: string | null;
1550
+ tenantId: string;
1551
+ buyerId: string;
839
1552
  sellerId?: string | null;
1553
+ paymentMethodId?: string | null;
1554
+ contractNumber: string;
1555
+ title: string;
1556
+ description?: string | null;
840
1557
  contractType: string;
1558
+ totalAmount: number;
1559
+ downPayment?: number;
1560
+ downPaymentPaid?: number;
1561
+ principal?: number | null;
1562
+ interestRate?: number | null;
1563
+ termMonths?: number | null;
1564
+ periodicPayment?: number | null;
1565
+ totalPaidToDate?: number;
1566
+ totalInterestPaid?: number;
1567
+ status?: string;
1568
+ state?: string;
1569
+ currentPhaseId?: string | null;
1570
+ nextPaymentDueDate?: Date | string | null;
1571
+ lastReminderSentAt?: Date | string | null;
1572
+ startDate?: Date | string | null;
1573
+ endDate?: Date | string | null;
1574
+ signedAt?: Date | string | null;
1575
+ terminatedAt?: Date | string | null;
1576
+ createdAt?: Date | string;
1577
+ updatedAt?: Date | string;
1578
+ phases?: Prisma.ContractPhaseUncheckedCreateNestedManyWithoutContractInput;
1579
+ documents?: Prisma.ContractDocumentUncheckedCreateNestedManyWithoutContractInput;
1580
+ payments?: Prisma.ContractPaymentUncheckedCreateNestedManyWithoutContractInput;
1581
+ transitions?: Prisma.ContractTransitionUncheckedCreateNestedManyWithoutContractInput;
1582
+ events?: Prisma.ContractEventUncheckedCreateNestedManyWithoutContractInput;
1583
+ };
1584
+ export type ContractCreateOrConnectWithoutPropertyUnitInput = {
1585
+ where: Prisma.ContractWhereUniqueInput;
1586
+ create: Prisma.XOR<Prisma.ContractCreateWithoutPropertyUnitInput, Prisma.ContractUncheckedCreateWithoutPropertyUnitInput>;
1587
+ };
1588
+ export type ContractCreateManyPropertyUnitInputEnvelope = {
1589
+ data: Prisma.ContractCreateManyPropertyUnitInput | Prisma.ContractCreateManyPropertyUnitInput[];
1590
+ skipDuplicates?: boolean;
1591
+ };
1592
+ export type ContractUpsertWithWhereUniqueWithoutPropertyUnitInput = {
1593
+ where: Prisma.ContractWhereUniqueInput;
1594
+ update: Prisma.XOR<Prisma.ContractUpdateWithoutPropertyUnitInput, Prisma.ContractUncheckedUpdateWithoutPropertyUnitInput>;
1595
+ create: Prisma.XOR<Prisma.ContractCreateWithoutPropertyUnitInput, Prisma.ContractUncheckedCreateWithoutPropertyUnitInput>;
1596
+ };
1597
+ export type ContractUpdateWithWhereUniqueWithoutPropertyUnitInput = {
1598
+ where: Prisma.ContractWhereUniqueInput;
1599
+ data: Prisma.XOR<Prisma.ContractUpdateWithoutPropertyUnitInput, Prisma.ContractUncheckedUpdateWithoutPropertyUnitInput>;
1600
+ };
1601
+ export type ContractUpdateManyWithWhereWithoutPropertyUnitInput = {
1602
+ where: Prisma.ContractScalarWhereInput;
1603
+ data: Prisma.XOR<Prisma.ContractUpdateManyMutationInput, Prisma.ContractUncheckedUpdateManyWithoutPropertyUnitInput>;
1604
+ };
1605
+ export type ContractCreateWithoutPaymentMethodInput = {
1606
+ id?: string;
1607
+ contractNumber: string;
1608
+ title: string;
1609
+ description?: string | null;
1610
+ contractType: string;
1611
+ totalAmount: number;
1612
+ downPayment?: number;
1613
+ downPaymentPaid?: number;
1614
+ principal?: number | null;
1615
+ interestRate?: number | null;
1616
+ termMonths?: number | null;
1617
+ periodicPayment?: number | null;
1618
+ totalPaidToDate?: number;
1619
+ totalInterestPaid?: number;
1620
+ status?: string;
1621
+ state?: string;
1622
+ currentPhaseId?: string | null;
1623
+ nextPaymentDueDate?: Date | string | null;
1624
+ lastReminderSentAt?: Date | string | null;
1625
+ startDate?: Date | string | null;
1626
+ endDate?: Date | string | null;
1627
+ signedAt?: Date | string | null;
1628
+ terminatedAt?: Date | string | null;
1629
+ createdAt?: Date | string;
1630
+ updatedAt?: Date | string;
1631
+ tenant: Prisma.TenantCreateNestedOneWithoutContractsInput;
1632
+ propertyUnit: Prisma.PropertyUnitCreateNestedOneWithoutContractsInput;
1633
+ buyer: Prisma.UserCreateNestedOneWithoutContractsInput;
1634
+ seller?: Prisma.UserCreateNestedOneWithoutSoldContractsInput;
1635
+ phases?: Prisma.ContractPhaseCreateNestedManyWithoutContractInput;
1636
+ documents?: Prisma.ContractDocumentCreateNestedManyWithoutContractInput;
1637
+ payments?: Prisma.ContractPaymentCreateNestedManyWithoutContractInput;
1638
+ transitions?: Prisma.ContractTransitionCreateNestedManyWithoutContractInput;
1639
+ events?: Prisma.ContractEventCreateNestedManyWithoutContractInput;
1640
+ };
1641
+ export type ContractUncheckedCreateWithoutPaymentMethodInput = {
1642
+ id?: string;
1643
+ tenantId: string;
1644
+ propertyUnitId: string;
1645
+ buyerId: string;
1646
+ sellerId?: string | null;
841
1647
  contractNumber: string;
842
1648
  title: string;
843
1649
  description?: string | null;
1650
+ contractType: string;
1651
+ totalAmount: number;
1652
+ downPayment?: number;
1653
+ downPaymentPaid?: number;
1654
+ principal?: number | null;
1655
+ interestRate?: number | null;
1656
+ termMonths?: number | null;
1657
+ periodicPayment?: number | null;
1658
+ totalPaidToDate?: number;
1659
+ totalInterestPaid?: number;
844
1660
  status?: string;
1661
+ state?: string;
1662
+ currentPhaseId?: string | null;
1663
+ nextPaymentDueDate?: Date | string | null;
1664
+ lastReminderSentAt?: Date | string | null;
845
1665
  startDate?: Date | string | null;
846
1666
  endDate?: Date | string | null;
847
1667
  signedAt?: Date | string | null;
848
1668
  terminatedAt?: Date | string | null;
849
1669
  createdAt?: Date | string;
850
1670
  updatedAt?: Date | string;
1671
+ phases?: Prisma.ContractPhaseUncheckedCreateNestedManyWithoutContractInput;
851
1672
  documents?: Prisma.ContractDocumentUncheckedCreateNestedManyWithoutContractInput;
1673
+ payments?: Prisma.ContractPaymentUncheckedCreateNestedManyWithoutContractInput;
1674
+ transitions?: Prisma.ContractTransitionUncheckedCreateNestedManyWithoutContractInput;
1675
+ events?: Prisma.ContractEventUncheckedCreateNestedManyWithoutContractInput;
852
1676
  };
853
- export type ContractCreateOrConnectWithoutPropertyInput = {
1677
+ export type ContractCreateOrConnectWithoutPaymentMethodInput = {
854
1678
  where: Prisma.ContractWhereUniqueInput;
855
- create: Prisma.XOR<Prisma.ContractCreateWithoutPropertyInput, Prisma.ContractUncheckedCreateWithoutPropertyInput>;
1679
+ create: Prisma.XOR<Prisma.ContractCreateWithoutPaymentMethodInput, Prisma.ContractUncheckedCreateWithoutPaymentMethodInput>;
856
1680
  };
857
- export type ContractCreateManyPropertyInputEnvelope = {
858
- data: Prisma.ContractCreateManyPropertyInput | Prisma.ContractCreateManyPropertyInput[];
1681
+ export type ContractCreateManyPaymentMethodInputEnvelope = {
1682
+ data: Prisma.ContractCreateManyPaymentMethodInput | Prisma.ContractCreateManyPaymentMethodInput[];
859
1683
  skipDuplicates?: boolean;
860
1684
  };
861
- export type ContractUpsertWithWhereUniqueWithoutPropertyInput = {
1685
+ export type ContractUpsertWithWhereUniqueWithoutPaymentMethodInput = {
862
1686
  where: Prisma.ContractWhereUniqueInput;
863
- update: Prisma.XOR<Prisma.ContractUpdateWithoutPropertyInput, Prisma.ContractUncheckedUpdateWithoutPropertyInput>;
864
- create: Prisma.XOR<Prisma.ContractCreateWithoutPropertyInput, Prisma.ContractUncheckedCreateWithoutPropertyInput>;
1687
+ update: Prisma.XOR<Prisma.ContractUpdateWithoutPaymentMethodInput, Prisma.ContractUncheckedUpdateWithoutPaymentMethodInput>;
1688
+ create: Prisma.XOR<Prisma.ContractCreateWithoutPaymentMethodInput, Prisma.ContractUncheckedCreateWithoutPaymentMethodInput>;
865
1689
  };
866
- export type ContractUpdateWithWhereUniqueWithoutPropertyInput = {
1690
+ export type ContractUpdateWithWhereUniqueWithoutPaymentMethodInput = {
867
1691
  where: Prisma.ContractWhereUniqueInput;
868
- data: Prisma.XOR<Prisma.ContractUpdateWithoutPropertyInput, Prisma.ContractUncheckedUpdateWithoutPropertyInput>;
1692
+ data: Prisma.XOR<Prisma.ContractUpdateWithoutPaymentMethodInput, Prisma.ContractUncheckedUpdateWithoutPaymentMethodInput>;
869
1693
  };
870
- export type ContractUpdateManyWithWhereWithoutPropertyInput = {
1694
+ export type ContractUpdateManyWithWhereWithoutPaymentMethodInput = {
871
1695
  where: Prisma.ContractScalarWhereInput;
872
- data: Prisma.XOR<Prisma.ContractUpdateManyMutationInput, Prisma.ContractUncheckedUpdateManyWithoutPropertyInput>;
1696
+ data: Prisma.XOR<Prisma.ContractUpdateManyMutationInput, Prisma.ContractUncheckedUpdateManyWithoutPaymentMethodInput>;
1697
+ };
1698
+ export type ContractCreateWithoutPhasesInput = {
1699
+ id?: string;
1700
+ contractNumber: string;
1701
+ title: string;
1702
+ description?: string | null;
1703
+ contractType: string;
1704
+ totalAmount: number;
1705
+ downPayment?: number;
1706
+ downPaymentPaid?: number;
1707
+ principal?: number | null;
1708
+ interestRate?: number | null;
1709
+ termMonths?: number | null;
1710
+ periodicPayment?: number | null;
1711
+ totalPaidToDate?: number;
1712
+ totalInterestPaid?: number;
1713
+ status?: string;
1714
+ state?: string;
1715
+ currentPhaseId?: string | null;
1716
+ nextPaymentDueDate?: Date | string | null;
1717
+ lastReminderSentAt?: Date | string | null;
1718
+ startDate?: Date | string | null;
1719
+ endDate?: Date | string | null;
1720
+ signedAt?: Date | string | null;
1721
+ terminatedAt?: Date | string | null;
1722
+ createdAt?: Date | string;
1723
+ updatedAt?: Date | string;
1724
+ tenant: Prisma.TenantCreateNestedOneWithoutContractsInput;
1725
+ propertyUnit: Prisma.PropertyUnitCreateNestedOneWithoutContractsInput;
1726
+ buyer: Prisma.UserCreateNestedOneWithoutContractsInput;
1727
+ seller?: Prisma.UserCreateNestedOneWithoutSoldContractsInput;
1728
+ paymentMethod?: Prisma.PropertyPaymentMethodCreateNestedOneWithoutContractsInput;
1729
+ documents?: Prisma.ContractDocumentCreateNestedManyWithoutContractInput;
1730
+ payments?: Prisma.ContractPaymentCreateNestedManyWithoutContractInput;
1731
+ transitions?: Prisma.ContractTransitionCreateNestedManyWithoutContractInput;
1732
+ events?: Prisma.ContractEventCreateNestedManyWithoutContractInput;
1733
+ };
1734
+ export type ContractUncheckedCreateWithoutPhasesInput = {
1735
+ id?: string;
1736
+ tenantId: string;
1737
+ propertyUnitId: string;
1738
+ buyerId: string;
1739
+ sellerId?: string | null;
1740
+ paymentMethodId?: string | null;
1741
+ contractNumber: string;
1742
+ title: string;
1743
+ description?: string | null;
1744
+ contractType: string;
1745
+ totalAmount: number;
1746
+ downPayment?: number;
1747
+ downPaymentPaid?: number;
1748
+ principal?: number | null;
1749
+ interestRate?: number | null;
1750
+ termMonths?: number | null;
1751
+ periodicPayment?: number | null;
1752
+ totalPaidToDate?: number;
1753
+ totalInterestPaid?: number;
1754
+ status?: string;
1755
+ state?: string;
1756
+ currentPhaseId?: string | null;
1757
+ nextPaymentDueDate?: Date | string | null;
1758
+ lastReminderSentAt?: Date | string | null;
1759
+ startDate?: Date | string | null;
1760
+ endDate?: Date | string | null;
1761
+ signedAt?: Date | string | null;
1762
+ terminatedAt?: Date | string | null;
1763
+ createdAt?: Date | string;
1764
+ updatedAt?: Date | string;
1765
+ documents?: Prisma.ContractDocumentUncheckedCreateNestedManyWithoutContractInput;
1766
+ payments?: Prisma.ContractPaymentUncheckedCreateNestedManyWithoutContractInput;
1767
+ transitions?: Prisma.ContractTransitionUncheckedCreateNestedManyWithoutContractInput;
1768
+ events?: Prisma.ContractEventUncheckedCreateNestedManyWithoutContractInput;
1769
+ };
1770
+ export type ContractCreateOrConnectWithoutPhasesInput = {
1771
+ where: Prisma.ContractWhereUniqueInput;
1772
+ create: Prisma.XOR<Prisma.ContractCreateWithoutPhasesInput, Prisma.ContractUncheckedCreateWithoutPhasesInput>;
1773
+ };
1774
+ export type ContractUpsertWithoutPhasesInput = {
1775
+ update: Prisma.XOR<Prisma.ContractUpdateWithoutPhasesInput, Prisma.ContractUncheckedUpdateWithoutPhasesInput>;
1776
+ create: Prisma.XOR<Prisma.ContractCreateWithoutPhasesInput, Prisma.ContractUncheckedCreateWithoutPhasesInput>;
1777
+ where?: Prisma.ContractWhereInput;
1778
+ };
1779
+ export type ContractUpdateToOneWithWhereWithoutPhasesInput = {
1780
+ where?: Prisma.ContractWhereInput;
1781
+ data: Prisma.XOR<Prisma.ContractUpdateWithoutPhasesInput, Prisma.ContractUncheckedUpdateWithoutPhasesInput>;
1782
+ };
1783
+ export type ContractUpdateWithoutPhasesInput = {
1784
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
1785
+ contractNumber?: Prisma.StringFieldUpdateOperationsInput | string;
1786
+ title?: Prisma.StringFieldUpdateOperationsInput | string;
1787
+ description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1788
+ contractType?: Prisma.StringFieldUpdateOperationsInput | string;
1789
+ totalAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
1790
+ downPayment?: Prisma.FloatFieldUpdateOperationsInput | number;
1791
+ downPaymentPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
1792
+ principal?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
1793
+ interestRate?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
1794
+ termMonths?: Prisma.NullableIntFieldUpdateOperationsInput | number | null;
1795
+ periodicPayment?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
1796
+ totalPaidToDate?: Prisma.FloatFieldUpdateOperationsInput | number;
1797
+ totalInterestPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
1798
+ status?: Prisma.StringFieldUpdateOperationsInput | string;
1799
+ state?: Prisma.StringFieldUpdateOperationsInput | string;
1800
+ currentPhaseId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1801
+ nextPaymentDueDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1802
+ lastReminderSentAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1803
+ startDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1804
+ endDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1805
+ signedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1806
+ terminatedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1807
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
1808
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
1809
+ tenant?: Prisma.TenantUpdateOneRequiredWithoutContractsNestedInput;
1810
+ propertyUnit?: Prisma.PropertyUnitUpdateOneRequiredWithoutContractsNestedInput;
1811
+ buyer?: Prisma.UserUpdateOneRequiredWithoutContractsNestedInput;
1812
+ seller?: Prisma.UserUpdateOneWithoutSoldContractsNestedInput;
1813
+ paymentMethod?: Prisma.PropertyPaymentMethodUpdateOneWithoutContractsNestedInput;
1814
+ documents?: Prisma.ContractDocumentUpdateManyWithoutContractNestedInput;
1815
+ payments?: Prisma.ContractPaymentUpdateManyWithoutContractNestedInput;
1816
+ transitions?: Prisma.ContractTransitionUpdateManyWithoutContractNestedInput;
1817
+ events?: Prisma.ContractEventUpdateManyWithoutContractNestedInput;
1818
+ };
1819
+ export type ContractUncheckedUpdateWithoutPhasesInput = {
1820
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
1821
+ tenantId?: Prisma.StringFieldUpdateOperationsInput | string;
1822
+ propertyUnitId?: Prisma.StringFieldUpdateOperationsInput | string;
1823
+ buyerId?: Prisma.StringFieldUpdateOperationsInput | string;
1824
+ sellerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1825
+ paymentMethodId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1826
+ contractNumber?: Prisma.StringFieldUpdateOperationsInput | string;
1827
+ title?: Prisma.StringFieldUpdateOperationsInput | string;
1828
+ description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1829
+ contractType?: Prisma.StringFieldUpdateOperationsInput | string;
1830
+ totalAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
1831
+ downPayment?: Prisma.FloatFieldUpdateOperationsInput | number;
1832
+ downPaymentPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
1833
+ principal?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
1834
+ interestRate?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
1835
+ termMonths?: Prisma.NullableIntFieldUpdateOperationsInput | number | null;
1836
+ periodicPayment?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
1837
+ totalPaidToDate?: Prisma.FloatFieldUpdateOperationsInput | number;
1838
+ totalInterestPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
1839
+ status?: Prisma.StringFieldUpdateOperationsInput | string;
1840
+ state?: Prisma.StringFieldUpdateOperationsInput | string;
1841
+ currentPhaseId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1842
+ nextPaymentDueDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1843
+ lastReminderSentAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1844
+ startDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1845
+ endDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1846
+ signedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1847
+ terminatedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1848
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
1849
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
1850
+ documents?: Prisma.ContractDocumentUncheckedUpdateManyWithoutContractNestedInput;
1851
+ payments?: Prisma.ContractPaymentUncheckedUpdateManyWithoutContractNestedInput;
1852
+ transitions?: Prisma.ContractTransitionUncheckedUpdateManyWithoutContractNestedInput;
1853
+ events?: Prisma.ContractEventUncheckedUpdateManyWithoutContractNestedInput;
1854
+ };
1855
+ export type ContractCreateWithoutPaymentsInput = {
1856
+ id?: string;
1857
+ contractNumber: string;
1858
+ title: string;
1859
+ description?: string | null;
1860
+ contractType: string;
1861
+ totalAmount: number;
1862
+ downPayment?: number;
1863
+ downPaymentPaid?: number;
1864
+ principal?: number | null;
1865
+ interestRate?: number | null;
1866
+ termMonths?: number | null;
1867
+ periodicPayment?: number | null;
1868
+ totalPaidToDate?: number;
1869
+ totalInterestPaid?: number;
1870
+ status?: string;
1871
+ state?: string;
1872
+ currentPhaseId?: string | null;
1873
+ nextPaymentDueDate?: Date | string | null;
1874
+ lastReminderSentAt?: Date | string | null;
1875
+ startDate?: Date | string | null;
1876
+ endDate?: Date | string | null;
1877
+ signedAt?: Date | string | null;
1878
+ terminatedAt?: Date | string | null;
1879
+ createdAt?: Date | string;
1880
+ updatedAt?: Date | string;
1881
+ tenant: Prisma.TenantCreateNestedOneWithoutContractsInput;
1882
+ propertyUnit: Prisma.PropertyUnitCreateNestedOneWithoutContractsInput;
1883
+ buyer: Prisma.UserCreateNestedOneWithoutContractsInput;
1884
+ seller?: Prisma.UserCreateNestedOneWithoutSoldContractsInput;
1885
+ paymentMethod?: Prisma.PropertyPaymentMethodCreateNestedOneWithoutContractsInput;
1886
+ phases?: Prisma.ContractPhaseCreateNestedManyWithoutContractInput;
1887
+ documents?: Prisma.ContractDocumentCreateNestedManyWithoutContractInput;
1888
+ transitions?: Prisma.ContractTransitionCreateNestedManyWithoutContractInput;
1889
+ events?: Prisma.ContractEventCreateNestedManyWithoutContractInput;
1890
+ };
1891
+ export type ContractUncheckedCreateWithoutPaymentsInput = {
1892
+ id?: string;
1893
+ tenantId: string;
1894
+ propertyUnitId: string;
1895
+ buyerId: string;
1896
+ sellerId?: string | null;
1897
+ paymentMethodId?: string | null;
1898
+ contractNumber: string;
1899
+ title: string;
1900
+ description?: string | null;
1901
+ contractType: string;
1902
+ totalAmount: number;
1903
+ downPayment?: number;
1904
+ downPaymentPaid?: number;
1905
+ principal?: number | null;
1906
+ interestRate?: number | null;
1907
+ termMonths?: number | null;
1908
+ periodicPayment?: number | null;
1909
+ totalPaidToDate?: number;
1910
+ totalInterestPaid?: number;
1911
+ status?: string;
1912
+ state?: string;
1913
+ currentPhaseId?: string | null;
1914
+ nextPaymentDueDate?: Date | string | null;
1915
+ lastReminderSentAt?: Date | string | null;
1916
+ startDate?: Date | string | null;
1917
+ endDate?: Date | string | null;
1918
+ signedAt?: Date | string | null;
1919
+ terminatedAt?: Date | string | null;
1920
+ createdAt?: Date | string;
1921
+ updatedAt?: Date | string;
1922
+ phases?: Prisma.ContractPhaseUncheckedCreateNestedManyWithoutContractInput;
1923
+ documents?: Prisma.ContractDocumentUncheckedCreateNestedManyWithoutContractInput;
1924
+ transitions?: Prisma.ContractTransitionUncheckedCreateNestedManyWithoutContractInput;
1925
+ events?: Prisma.ContractEventUncheckedCreateNestedManyWithoutContractInput;
1926
+ };
1927
+ export type ContractCreateOrConnectWithoutPaymentsInput = {
1928
+ where: Prisma.ContractWhereUniqueInput;
1929
+ create: Prisma.XOR<Prisma.ContractCreateWithoutPaymentsInput, Prisma.ContractUncheckedCreateWithoutPaymentsInput>;
1930
+ };
1931
+ export type ContractUpsertWithoutPaymentsInput = {
1932
+ update: Prisma.XOR<Prisma.ContractUpdateWithoutPaymentsInput, Prisma.ContractUncheckedUpdateWithoutPaymentsInput>;
1933
+ create: Prisma.XOR<Prisma.ContractCreateWithoutPaymentsInput, Prisma.ContractUncheckedCreateWithoutPaymentsInput>;
1934
+ where?: Prisma.ContractWhereInput;
1935
+ };
1936
+ export type ContractUpdateToOneWithWhereWithoutPaymentsInput = {
1937
+ where?: Prisma.ContractWhereInput;
1938
+ data: Prisma.XOR<Prisma.ContractUpdateWithoutPaymentsInput, Prisma.ContractUncheckedUpdateWithoutPaymentsInput>;
1939
+ };
1940
+ export type ContractUpdateWithoutPaymentsInput = {
1941
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
1942
+ contractNumber?: Prisma.StringFieldUpdateOperationsInput | string;
1943
+ title?: Prisma.StringFieldUpdateOperationsInput | string;
1944
+ description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1945
+ contractType?: Prisma.StringFieldUpdateOperationsInput | string;
1946
+ totalAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
1947
+ downPayment?: Prisma.FloatFieldUpdateOperationsInput | number;
1948
+ downPaymentPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
1949
+ principal?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
1950
+ interestRate?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
1951
+ termMonths?: Prisma.NullableIntFieldUpdateOperationsInput | number | null;
1952
+ periodicPayment?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
1953
+ totalPaidToDate?: Prisma.FloatFieldUpdateOperationsInput | number;
1954
+ totalInterestPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
1955
+ status?: Prisma.StringFieldUpdateOperationsInput | string;
1956
+ state?: Prisma.StringFieldUpdateOperationsInput | string;
1957
+ currentPhaseId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1958
+ nextPaymentDueDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1959
+ lastReminderSentAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1960
+ startDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1961
+ endDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1962
+ signedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1963
+ terminatedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1964
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
1965
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
1966
+ tenant?: Prisma.TenantUpdateOneRequiredWithoutContractsNestedInput;
1967
+ propertyUnit?: Prisma.PropertyUnitUpdateOneRequiredWithoutContractsNestedInput;
1968
+ buyer?: Prisma.UserUpdateOneRequiredWithoutContractsNestedInput;
1969
+ seller?: Prisma.UserUpdateOneWithoutSoldContractsNestedInput;
1970
+ paymentMethod?: Prisma.PropertyPaymentMethodUpdateOneWithoutContractsNestedInput;
1971
+ phases?: Prisma.ContractPhaseUpdateManyWithoutContractNestedInput;
1972
+ documents?: Prisma.ContractDocumentUpdateManyWithoutContractNestedInput;
1973
+ transitions?: Prisma.ContractTransitionUpdateManyWithoutContractNestedInput;
1974
+ events?: Prisma.ContractEventUpdateManyWithoutContractNestedInput;
1975
+ };
1976
+ export type ContractUncheckedUpdateWithoutPaymentsInput = {
1977
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
1978
+ tenantId?: Prisma.StringFieldUpdateOperationsInput | string;
1979
+ propertyUnitId?: Prisma.StringFieldUpdateOperationsInput | string;
1980
+ buyerId?: Prisma.StringFieldUpdateOperationsInput | string;
1981
+ sellerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1982
+ paymentMethodId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1983
+ contractNumber?: Prisma.StringFieldUpdateOperationsInput | string;
1984
+ title?: Prisma.StringFieldUpdateOperationsInput | string;
1985
+ description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1986
+ contractType?: Prisma.StringFieldUpdateOperationsInput | string;
1987
+ totalAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
1988
+ downPayment?: Prisma.FloatFieldUpdateOperationsInput | number;
1989
+ downPaymentPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
1990
+ principal?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
1991
+ interestRate?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
1992
+ termMonths?: Prisma.NullableIntFieldUpdateOperationsInput | number | null;
1993
+ periodicPayment?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
1994
+ totalPaidToDate?: Prisma.FloatFieldUpdateOperationsInput | number;
1995
+ totalInterestPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
1996
+ status?: Prisma.StringFieldUpdateOperationsInput | string;
1997
+ state?: Prisma.StringFieldUpdateOperationsInput | string;
1998
+ currentPhaseId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1999
+ nextPaymentDueDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
2000
+ lastReminderSentAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
2001
+ startDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
2002
+ endDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
2003
+ signedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
2004
+ terminatedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
2005
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
2006
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
2007
+ phases?: Prisma.ContractPhaseUncheckedUpdateManyWithoutContractNestedInput;
2008
+ documents?: Prisma.ContractDocumentUncheckedUpdateManyWithoutContractNestedInput;
2009
+ transitions?: Prisma.ContractTransitionUncheckedUpdateManyWithoutContractNestedInput;
2010
+ events?: Prisma.ContractEventUncheckedUpdateManyWithoutContractNestedInput;
2011
+ };
2012
+ export type ContractCreateWithoutDocumentsInput = {
2013
+ id?: string;
2014
+ contractNumber: string;
2015
+ title: string;
2016
+ description?: string | null;
2017
+ contractType: string;
2018
+ totalAmount: number;
2019
+ downPayment?: number;
2020
+ downPaymentPaid?: number;
2021
+ principal?: number | null;
2022
+ interestRate?: number | null;
2023
+ termMonths?: number | null;
2024
+ periodicPayment?: number | null;
2025
+ totalPaidToDate?: number;
2026
+ totalInterestPaid?: number;
2027
+ status?: string;
2028
+ state?: string;
2029
+ currentPhaseId?: string | null;
2030
+ nextPaymentDueDate?: Date | string | null;
2031
+ lastReminderSentAt?: Date | string | null;
2032
+ startDate?: Date | string | null;
2033
+ endDate?: Date | string | null;
2034
+ signedAt?: Date | string | null;
2035
+ terminatedAt?: Date | string | null;
2036
+ createdAt?: Date | string;
2037
+ updatedAt?: Date | string;
2038
+ tenant: Prisma.TenantCreateNestedOneWithoutContractsInput;
2039
+ propertyUnit: Prisma.PropertyUnitCreateNestedOneWithoutContractsInput;
2040
+ buyer: Prisma.UserCreateNestedOneWithoutContractsInput;
2041
+ seller?: Prisma.UserCreateNestedOneWithoutSoldContractsInput;
2042
+ paymentMethod?: Prisma.PropertyPaymentMethodCreateNestedOneWithoutContractsInput;
2043
+ phases?: Prisma.ContractPhaseCreateNestedManyWithoutContractInput;
2044
+ payments?: Prisma.ContractPaymentCreateNestedManyWithoutContractInput;
2045
+ transitions?: Prisma.ContractTransitionCreateNestedManyWithoutContractInput;
2046
+ events?: Prisma.ContractEventCreateNestedManyWithoutContractInput;
2047
+ };
2048
+ export type ContractUncheckedCreateWithoutDocumentsInput = {
2049
+ id?: string;
2050
+ tenantId: string;
2051
+ propertyUnitId: string;
2052
+ buyerId: string;
2053
+ sellerId?: string | null;
2054
+ paymentMethodId?: string | null;
2055
+ contractNumber: string;
2056
+ title: string;
2057
+ description?: string | null;
2058
+ contractType: string;
2059
+ totalAmount: number;
2060
+ downPayment?: number;
2061
+ downPaymentPaid?: number;
2062
+ principal?: number | null;
2063
+ interestRate?: number | null;
2064
+ termMonths?: number | null;
2065
+ periodicPayment?: number | null;
2066
+ totalPaidToDate?: number;
2067
+ totalInterestPaid?: number;
2068
+ status?: string;
2069
+ state?: string;
2070
+ currentPhaseId?: string | null;
2071
+ nextPaymentDueDate?: Date | string | null;
2072
+ lastReminderSentAt?: Date | string | null;
2073
+ startDate?: Date | string | null;
2074
+ endDate?: Date | string | null;
2075
+ signedAt?: Date | string | null;
2076
+ terminatedAt?: Date | string | null;
2077
+ createdAt?: Date | string;
2078
+ updatedAt?: Date | string;
2079
+ phases?: Prisma.ContractPhaseUncheckedCreateNestedManyWithoutContractInput;
2080
+ payments?: Prisma.ContractPaymentUncheckedCreateNestedManyWithoutContractInput;
2081
+ transitions?: Prisma.ContractTransitionUncheckedCreateNestedManyWithoutContractInput;
2082
+ events?: Prisma.ContractEventUncheckedCreateNestedManyWithoutContractInput;
2083
+ };
2084
+ export type ContractCreateOrConnectWithoutDocumentsInput = {
2085
+ where: Prisma.ContractWhereUniqueInput;
2086
+ create: Prisma.XOR<Prisma.ContractCreateWithoutDocumentsInput, Prisma.ContractUncheckedCreateWithoutDocumentsInput>;
2087
+ };
2088
+ export type ContractUpsertWithoutDocumentsInput = {
2089
+ update: Prisma.XOR<Prisma.ContractUpdateWithoutDocumentsInput, Prisma.ContractUncheckedUpdateWithoutDocumentsInput>;
2090
+ create: Prisma.XOR<Prisma.ContractCreateWithoutDocumentsInput, Prisma.ContractUncheckedCreateWithoutDocumentsInput>;
2091
+ where?: Prisma.ContractWhereInput;
2092
+ };
2093
+ export type ContractUpdateToOneWithWhereWithoutDocumentsInput = {
2094
+ where?: Prisma.ContractWhereInput;
2095
+ data: Prisma.XOR<Prisma.ContractUpdateWithoutDocumentsInput, Prisma.ContractUncheckedUpdateWithoutDocumentsInput>;
2096
+ };
2097
+ export type ContractUpdateWithoutDocumentsInput = {
2098
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
2099
+ contractNumber?: Prisma.StringFieldUpdateOperationsInput | string;
2100
+ title?: Prisma.StringFieldUpdateOperationsInput | string;
2101
+ description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
2102
+ contractType?: Prisma.StringFieldUpdateOperationsInput | string;
2103
+ totalAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
2104
+ downPayment?: Prisma.FloatFieldUpdateOperationsInput | number;
2105
+ downPaymentPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
2106
+ principal?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
2107
+ interestRate?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
2108
+ termMonths?: Prisma.NullableIntFieldUpdateOperationsInput | number | null;
2109
+ periodicPayment?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
2110
+ totalPaidToDate?: Prisma.FloatFieldUpdateOperationsInput | number;
2111
+ totalInterestPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
2112
+ status?: Prisma.StringFieldUpdateOperationsInput | string;
2113
+ state?: Prisma.StringFieldUpdateOperationsInput | string;
2114
+ currentPhaseId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
2115
+ nextPaymentDueDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
2116
+ lastReminderSentAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
2117
+ startDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
2118
+ endDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
2119
+ signedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
2120
+ terminatedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
2121
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
2122
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
2123
+ tenant?: Prisma.TenantUpdateOneRequiredWithoutContractsNestedInput;
2124
+ propertyUnit?: Prisma.PropertyUnitUpdateOneRequiredWithoutContractsNestedInput;
2125
+ buyer?: Prisma.UserUpdateOneRequiredWithoutContractsNestedInput;
2126
+ seller?: Prisma.UserUpdateOneWithoutSoldContractsNestedInput;
2127
+ paymentMethod?: Prisma.PropertyPaymentMethodUpdateOneWithoutContractsNestedInput;
2128
+ phases?: Prisma.ContractPhaseUpdateManyWithoutContractNestedInput;
2129
+ payments?: Prisma.ContractPaymentUpdateManyWithoutContractNestedInput;
2130
+ transitions?: Prisma.ContractTransitionUpdateManyWithoutContractNestedInput;
2131
+ events?: Prisma.ContractEventUpdateManyWithoutContractNestedInput;
2132
+ };
2133
+ export type ContractUncheckedUpdateWithoutDocumentsInput = {
2134
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
2135
+ tenantId?: Prisma.StringFieldUpdateOperationsInput | string;
2136
+ propertyUnitId?: Prisma.StringFieldUpdateOperationsInput | string;
2137
+ buyerId?: Prisma.StringFieldUpdateOperationsInput | string;
2138
+ sellerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
2139
+ paymentMethodId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
2140
+ contractNumber?: Prisma.StringFieldUpdateOperationsInput | string;
2141
+ title?: Prisma.StringFieldUpdateOperationsInput | string;
2142
+ description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
2143
+ contractType?: Prisma.StringFieldUpdateOperationsInput | string;
2144
+ totalAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
2145
+ downPayment?: Prisma.FloatFieldUpdateOperationsInput | number;
2146
+ downPaymentPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
2147
+ principal?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
2148
+ interestRate?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
2149
+ termMonths?: Prisma.NullableIntFieldUpdateOperationsInput | number | null;
2150
+ periodicPayment?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
2151
+ totalPaidToDate?: Prisma.FloatFieldUpdateOperationsInput | number;
2152
+ totalInterestPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
2153
+ status?: Prisma.StringFieldUpdateOperationsInput | string;
2154
+ state?: Prisma.StringFieldUpdateOperationsInput | string;
2155
+ currentPhaseId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
2156
+ nextPaymentDueDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
2157
+ lastReminderSentAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
2158
+ startDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
2159
+ endDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
2160
+ signedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
2161
+ terminatedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
2162
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
2163
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
2164
+ phases?: Prisma.ContractPhaseUncheckedUpdateManyWithoutContractNestedInput;
2165
+ payments?: Prisma.ContractPaymentUncheckedUpdateManyWithoutContractNestedInput;
2166
+ transitions?: Prisma.ContractTransitionUncheckedUpdateManyWithoutContractNestedInput;
2167
+ events?: Prisma.ContractEventUncheckedUpdateManyWithoutContractNestedInput;
873
2168
  };
874
- export type ContractCreateWithoutPaymentPlanInput = {
2169
+ export type ContractCreateWithoutTransitionsInput = {
875
2170
  id?: string;
876
- contractType: string;
877
2171
  contractNumber: string;
878
2172
  title: string;
879
2173
  description?: string | null;
2174
+ contractType: string;
2175
+ totalAmount: number;
2176
+ downPayment?: number;
2177
+ downPaymentPaid?: number;
2178
+ principal?: number | null;
2179
+ interestRate?: number | null;
2180
+ termMonths?: number | null;
2181
+ periodicPayment?: number | null;
2182
+ totalPaidToDate?: number;
2183
+ totalInterestPaid?: number;
880
2184
  status?: string;
2185
+ state?: string;
2186
+ currentPhaseId?: string | null;
2187
+ nextPaymentDueDate?: Date | string | null;
2188
+ lastReminderSentAt?: Date | string | null;
881
2189
  startDate?: Date | string | null;
882
2190
  endDate?: Date | string | null;
883
2191
  signedAt?: Date | string | null;
884
2192
  terminatedAt?: Date | string | null;
885
2193
  createdAt?: Date | string;
886
2194
  updatedAt?: Date | string;
887
- property: Prisma.PropertyCreateNestedOneWithoutContractsInput;
888
- buyer?: Prisma.UserCreateNestedOneWithoutContractsInput;
2195
+ tenant: Prisma.TenantCreateNestedOneWithoutContractsInput;
2196
+ propertyUnit: Prisma.PropertyUnitCreateNestedOneWithoutContractsInput;
2197
+ buyer: Prisma.UserCreateNestedOneWithoutContractsInput;
889
2198
  seller?: Prisma.UserCreateNestedOneWithoutSoldContractsInput;
2199
+ paymentMethod?: Prisma.PropertyPaymentMethodCreateNestedOneWithoutContractsInput;
2200
+ phases?: Prisma.ContractPhaseCreateNestedManyWithoutContractInput;
890
2201
  documents?: Prisma.ContractDocumentCreateNestedManyWithoutContractInput;
2202
+ payments?: Prisma.ContractPaymentCreateNestedManyWithoutContractInput;
2203
+ events?: Prisma.ContractEventCreateNestedManyWithoutContractInput;
891
2204
  };
892
- export type ContractUncheckedCreateWithoutPaymentPlanInput = {
2205
+ export type ContractUncheckedCreateWithoutTransitionsInput = {
893
2206
  id?: string;
894
- propertyId: string;
895
- buyerId?: string | null;
2207
+ tenantId: string;
2208
+ propertyUnitId: string;
2209
+ buyerId: string;
896
2210
  sellerId?: string | null;
897
- contractType: string;
2211
+ paymentMethodId?: string | null;
898
2212
  contractNumber: string;
899
2213
  title: string;
900
2214
  description?: string | null;
2215
+ contractType: string;
2216
+ totalAmount: number;
2217
+ downPayment?: number;
2218
+ downPaymentPaid?: number;
2219
+ principal?: number | null;
2220
+ interestRate?: number | null;
2221
+ termMonths?: number | null;
2222
+ periodicPayment?: number | null;
2223
+ totalPaidToDate?: number;
2224
+ totalInterestPaid?: number;
901
2225
  status?: string;
2226
+ state?: string;
2227
+ currentPhaseId?: string | null;
2228
+ nextPaymentDueDate?: Date | string | null;
2229
+ lastReminderSentAt?: Date | string | null;
902
2230
  startDate?: Date | string | null;
903
2231
  endDate?: Date | string | null;
904
2232
  signedAt?: Date | string | null;
905
2233
  terminatedAt?: Date | string | null;
906
2234
  createdAt?: Date | string;
907
2235
  updatedAt?: Date | string;
2236
+ phases?: Prisma.ContractPhaseUncheckedCreateNestedManyWithoutContractInput;
908
2237
  documents?: Prisma.ContractDocumentUncheckedCreateNestedManyWithoutContractInput;
2238
+ payments?: Prisma.ContractPaymentUncheckedCreateNestedManyWithoutContractInput;
2239
+ events?: Prisma.ContractEventUncheckedCreateNestedManyWithoutContractInput;
909
2240
  };
910
- export type ContractCreateOrConnectWithoutPaymentPlanInput = {
2241
+ export type ContractCreateOrConnectWithoutTransitionsInput = {
911
2242
  where: Prisma.ContractWhereUniqueInput;
912
- create: Prisma.XOR<Prisma.ContractCreateWithoutPaymentPlanInput, Prisma.ContractUncheckedCreateWithoutPaymentPlanInput>;
2243
+ create: Prisma.XOR<Prisma.ContractCreateWithoutTransitionsInput, Prisma.ContractUncheckedCreateWithoutTransitionsInput>;
913
2244
  };
914
- export type ContractUpsertWithoutPaymentPlanInput = {
915
- update: Prisma.XOR<Prisma.ContractUpdateWithoutPaymentPlanInput, Prisma.ContractUncheckedUpdateWithoutPaymentPlanInput>;
916
- create: Prisma.XOR<Prisma.ContractCreateWithoutPaymentPlanInput, Prisma.ContractUncheckedCreateWithoutPaymentPlanInput>;
2245
+ export type ContractUpsertWithoutTransitionsInput = {
2246
+ update: Prisma.XOR<Prisma.ContractUpdateWithoutTransitionsInput, Prisma.ContractUncheckedUpdateWithoutTransitionsInput>;
2247
+ create: Prisma.XOR<Prisma.ContractCreateWithoutTransitionsInput, Prisma.ContractUncheckedCreateWithoutTransitionsInput>;
917
2248
  where?: Prisma.ContractWhereInput;
918
2249
  };
919
- export type ContractUpdateToOneWithWhereWithoutPaymentPlanInput = {
2250
+ export type ContractUpdateToOneWithWhereWithoutTransitionsInput = {
920
2251
  where?: Prisma.ContractWhereInput;
921
- data: Prisma.XOR<Prisma.ContractUpdateWithoutPaymentPlanInput, Prisma.ContractUncheckedUpdateWithoutPaymentPlanInput>;
2252
+ data: Prisma.XOR<Prisma.ContractUpdateWithoutTransitionsInput, Prisma.ContractUncheckedUpdateWithoutTransitionsInput>;
922
2253
  };
923
- export type ContractUpdateWithoutPaymentPlanInput = {
2254
+ export type ContractUpdateWithoutTransitionsInput = {
924
2255
  id?: Prisma.StringFieldUpdateOperationsInput | string;
925
- contractType?: Prisma.StringFieldUpdateOperationsInput | string;
926
2256
  contractNumber?: Prisma.StringFieldUpdateOperationsInput | string;
927
2257
  title?: Prisma.StringFieldUpdateOperationsInput | string;
928
2258
  description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
2259
+ contractType?: Prisma.StringFieldUpdateOperationsInput | string;
2260
+ totalAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
2261
+ downPayment?: Prisma.FloatFieldUpdateOperationsInput | number;
2262
+ downPaymentPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
2263
+ principal?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
2264
+ interestRate?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
2265
+ termMonths?: Prisma.NullableIntFieldUpdateOperationsInput | number | null;
2266
+ periodicPayment?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
2267
+ totalPaidToDate?: Prisma.FloatFieldUpdateOperationsInput | number;
2268
+ totalInterestPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
929
2269
  status?: Prisma.StringFieldUpdateOperationsInput | string;
2270
+ state?: Prisma.StringFieldUpdateOperationsInput | string;
2271
+ currentPhaseId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
2272
+ nextPaymentDueDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
2273
+ lastReminderSentAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
930
2274
  startDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
931
2275
  endDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
932
2276
  signedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
933
2277
  terminatedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
934
2278
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
935
2279
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
936
- property?: Prisma.PropertyUpdateOneRequiredWithoutContractsNestedInput;
937
- buyer?: Prisma.UserUpdateOneWithoutContractsNestedInput;
2280
+ tenant?: Prisma.TenantUpdateOneRequiredWithoutContractsNestedInput;
2281
+ propertyUnit?: Prisma.PropertyUnitUpdateOneRequiredWithoutContractsNestedInput;
2282
+ buyer?: Prisma.UserUpdateOneRequiredWithoutContractsNestedInput;
938
2283
  seller?: Prisma.UserUpdateOneWithoutSoldContractsNestedInput;
2284
+ paymentMethod?: Prisma.PropertyPaymentMethodUpdateOneWithoutContractsNestedInput;
2285
+ phases?: Prisma.ContractPhaseUpdateManyWithoutContractNestedInput;
939
2286
  documents?: Prisma.ContractDocumentUpdateManyWithoutContractNestedInput;
2287
+ payments?: Prisma.ContractPaymentUpdateManyWithoutContractNestedInput;
2288
+ events?: Prisma.ContractEventUpdateManyWithoutContractNestedInput;
940
2289
  };
941
- export type ContractUncheckedUpdateWithoutPaymentPlanInput = {
2290
+ export type ContractUncheckedUpdateWithoutTransitionsInput = {
942
2291
  id?: Prisma.StringFieldUpdateOperationsInput | string;
943
- propertyId?: Prisma.StringFieldUpdateOperationsInput | string;
944
- buyerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
2292
+ tenantId?: Prisma.StringFieldUpdateOperationsInput | string;
2293
+ propertyUnitId?: Prisma.StringFieldUpdateOperationsInput | string;
2294
+ buyerId?: Prisma.StringFieldUpdateOperationsInput | string;
945
2295
  sellerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
946
- contractType?: Prisma.StringFieldUpdateOperationsInput | string;
2296
+ paymentMethodId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
947
2297
  contractNumber?: Prisma.StringFieldUpdateOperationsInput | string;
948
2298
  title?: Prisma.StringFieldUpdateOperationsInput | string;
949
2299
  description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
2300
+ contractType?: Prisma.StringFieldUpdateOperationsInput | string;
2301
+ totalAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
2302
+ downPayment?: Prisma.FloatFieldUpdateOperationsInput | number;
2303
+ downPaymentPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
2304
+ principal?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
2305
+ interestRate?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
2306
+ termMonths?: Prisma.NullableIntFieldUpdateOperationsInput | number | null;
2307
+ periodicPayment?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
2308
+ totalPaidToDate?: Prisma.FloatFieldUpdateOperationsInput | number;
2309
+ totalInterestPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
950
2310
  status?: Prisma.StringFieldUpdateOperationsInput | string;
2311
+ state?: Prisma.StringFieldUpdateOperationsInput | string;
2312
+ currentPhaseId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
2313
+ nextPaymentDueDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
2314
+ lastReminderSentAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
951
2315
  startDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
952
2316
  endDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
953
2317
  signedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
954
2318
  terminatedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
955
2319
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
956
2320
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
2321
+ phases?: Prisma.ContractPhaseUncheckedUpdateManyWithoutContractNestedInput;
957
2322
  documents?: Prisma.ContractDocumentUncheckedUpdateManyWithoutContractNestedInput;
2323
+ payments?: Prisma.ContractPaymentUncheckedUpdateManyWithoutContractNestedInput;
2324
+ events?: Prisma.ContractEventUncheckedUpdateManyWithoutContractNestedInput;
958
2325
  };
959
- export type ContractCreateWithoutDocumentsInput = {
2326
+ export type ContractCreateWithoutEventsInput = {
960
2327
  id?: string;
961
- contractType: string;
962
2328
  contractNumber: string;
963
2329
  title: string;
964
2330
  description?: string | null;
2331
+ contractType: string;
2332
+ totalAmount: number;
2333
+ downPayment?: number;
2334
+ downPaymentPaid?: number;
2335
+ principal?: number | null;
2336
+ interestRate?: number | null;
2337
+ termMonths?: number | null;
2338
+ periodicPayment?: number | null;
2339
+ totalPaidToDate?: number;
2340
+ totalInterestPaid?: number;
965
2341
  status?: string;
2342
+ state?: string;
2343
+ currentPhaseId?: string | null;
2344
+ nextPaymentDueDate?: Date | string | null;
2345
+ lastReminderSentAt?: Date | string | null;
966
2346
  startDate?: Date | string | null;
967
2347
  endDate?: Date | string | null;
968
2348
  signedAt?: Date | string | null;
969
2349
  terminatedAt?: Date | string | null;
970
2350
  createdAt?: Date | string;
971
2351
  updatedAt?: Date | string;
972
- property: Prisma.PropertyCreateNestedOneWithoutContractsInput;
973
- paymentPlan?: Prisma.PaymentPlanCreateNestedOneWithoutContractInput;
974
- buyer?: Prisma.UserCreateNestedOneWithoutContractsInput;
2352
+ tenant: Prisma.TenantCreateNestedOneWithoutContractsInput;
2353
+ propertyUnit: Prisma.PropertyUnitCreateNestedOneWithoutContractsInput;
2354
+ buyer: Prisma.UserCreateNestedOneWithoutContractsInput;
975
2355
  seller?: Prisma.UserCreateNestedOneWithoutSoldContractsInput;
2356
+ paymentMethod?: Prisma.PropertyPaymentMethodCreateNestedOneWithoutContractsInput;
2357
+ phases?: Prisma.ContractPhaseCreateNestedManyWithoutContractInput;
2358
+ documents?: Prisma.ContractDocumentCreateNestedManyWithoutContractInput;
2359
+ payments?: Prisma.ContractPaymentCreateNestedManyWithoutContractInput;
2360
+ transitions?: Prisma.ContractTransitionCreateNestedManyWithoutContractInput;
976
2361
  };
977
- export type ContractUncheckedCreateWithoutDocumentsInput = {
2362
+ export type ContractUncheckedCreateWithoutEventsInput = {
978
2363
  id?: string;
979
- propertyId: string;
980
- paymentPlanId?: string | null;
981
- buyerId?: string | null;
2364
+ tenantId: string;
2365
+ propertyUnitId: string;
2366
+ buyerId: string;
982
2367
  sellerId?: string | null;
983
- contractType: string;
2368
+ paymentMethodId?: string | null;
984
2369
  contractNumber: string;
985
2370
  title: string;
986
2371
  description?: string | null;
2372
+ contractType: string;
2373
+ totalAmount: number;
2374
+ downPayment?: number;
2375
+ downPaymentPaid?: number;
2376
+ principal?: number | null;
2377
+ interestRate?: number | null;
2378
+ termMonths?: number | null;
2379
+ periodicPayment?: number | null;
2380
+ totalPaidToDate?: number;
2381
+ totalInterestPaid?: number;
987
2382
  status?: string;
2383
+ state?: string;
2384
+ currentPhaseId?: string | null;
2385
+ nextPaymentDueDate?: Date | string | null;
2386
+ lastReminderSentAt?: Date | string | null;
988
2387
  startDate?: Date | string | null;
989
2388
  endDate?: Date | string | null;
990
2389
  signedAt?: Date | string | null;
991
2390
  terminatedAt?: Date | string | null;
992
2391
  createdAt?: Date | string;
993
2392
  updatedAt?: Date | string;
2393
+ phases?: Prisma.ContractPhaseUncheckedCreateNestedManyWithoutContractInput;
2394
+ documents?: Prisma.ContractDocumentUncheckedCreateNestedManyWithoutContractInput;
2395
+ payments?: Prisma.ContractPaymentUncheckedCreateNestedManyWithoutContractInput;
2396
+ transitions?: Prisma.ContractTransitionUncheckedCreateNestedManyWithoutContractInput;
994
2397
  };
995
- export type ContractCreateOrConnectWithoutDocumentsInput = {
2398
+ export type ContractCreateOrConnectWithoutEventsInput = {
996
2399
  where: Prisma.ContractWhereUniqueInput;
997
- create: Prisma.XOR<Prisma.ContractCreateWithoutDocumentsInput, Prisma.ContractUncheckedCreateWithoutDocumentsInput>;
2400
+ create: Prisma.XOR<Prisma.ContractCreateWithoutEventsInput, Prisma.ContractUncheckedCreateWithoutEventsInput>;
998
2401
  };
999
- export type ContractUpsertWithoutDocumentsInput = {
1000
- update: Prisma.XOR<Prisma.ContractUpdateWithoutDocumentsInput, Prisma.ContractUncheckedUpdateWithoutDocumentsInput>;
1001
- create: Prisma.XOR<Prisma.ContractCreateWithoutDocumentsInput, Prisma.ContractUncheckedCreateWithoutDocumentsInput>;
2402
+ export type ContractUpsertWithoutEventsInput = {
2403
+ update: Prisma.XOR<Prisma.ContractUpdateWithoutEventsInput, Prisma.ContractUncheckedUpdateWithoutEventsInput>;
2404
+ create: Prisma.XOR<Prisma.ContractCreateWithoutEventsInput, Prisma.ContractUncheckedCreateWithoutEventsInput>;
1002
2405
  where?: Prisma.ContractWhereInput;
1003
2406
  };
1004
- export type ContractUpdateToOneWithWhereWithoutDocumentsInput = {
2407
+ export type ContractUpdateToOneWithWhereWithoutEventsInput = {
1005
2408
  where?: Prisma.ContractWhereInput;
1006
- data: Prisma.XOR<Prisma.ContractUpdateWithoutDocumentsInput, Prisma.ContractUncheckedUpdateWithoutDocumentsInput>;
2409
+ data: Prisma.XOR<Prisma.ContractUpdateWithoutEventsInput, Prisma.ContractUncheckedUpdateWithoutEventsInput>;
1007
2410
  };
1008
- export type ContractUpdateWithoutDocumentsInput = {
2411
+ export type ContractUpdateWithoutEventsInput = {
1009
2412
  id?: Prisma.StringFieldUpdateOperationsInput | string;
1010
- contractType?: Prisma.StringFieldUpdateOperationsInput | string;
1011
2413
  contractNumber?: Prisma.StringFieldUpdateOperationsInput | string;
1012
2414
  title?: Prisma.StringFieldUpdateOperationsInput | string;
1013
2415
  description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
2416
+ contractType?: Prisma.StringFieldUpdateOperationsInput | string;
2417
+ totalAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
2418
+ downPayment?: Prisma.FloatFieldUpdateOperationsInput | number;
2419
+ downPaymentPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
2420
+ principal?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
2421
+ interestRate?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
2422
+ termMonths?: Prisma.NullableIntFieldUpdateOperationsInput | number | null;
2423
+ periodicPayment?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
2424
+ totalPaidToDate?: Prisma.FloatFieldUpdateOperationsInput | number;
2425
+ totalInterestPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
1014
2426
  status?: Prisma.StringFieldUpdateOperationsInput | string;
2427
+ state?: Prisma.StringFieldUpdateOperationsInput | string;
2428
+ currentPhaseId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
2429
+ nextPaymentDueDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
2430
+ lastReminderSentAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1015
2431
  startDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1016
2432
  endDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1017
2433
  signedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1018
2434
  terminatedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1019
2435
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
1020
2436
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
1021
- property?: Prisma.PropertyUpdateOneRequiredWithoutContractsNestedInput;
1022
- paymentPlan?: Prisma.PaymentPlanUpdateOneWithoutContractNestedInput;
1023
- buyer?: Prisma.UserUpdateOneWithoutContractsNestedInput;
2437
+ tenant?: Prisma.TenantUpdateOneRequiredWithoutContractsNestedInput;
2438
+ propertyUnit?: Prisma.PropertyUnitUpdateOneRequiredWithoutContractsNestedInput;
2439
+ buyer?: Prisma.UserUpdateOneRequiredWithoutContractsNestedInput;
1024
2440
  seller?: Prisma.UserUpdateOneWithoutSoldContractsNestedInput;
2441
+ paymentMethod?: Prisma.PropertyPaymentMethodUpdateOneWithoutContractsNestedInput;
2442
+ phases?: Prisma.ContractPhaseUpdateManyWithoutContractNestedInput;
2443
+ documents?: Prisma.ContractDocumentUpdateManyWithoutContractNestedInput;
2444
+ payments?: Prisma.ContractPaymentUpdateManyWithoutContractNestedInput;
2445
+ transitions?: Prisma.ContractTransitionUpdateManyWithoutContractNestedInput;
1025
2446
  };
1026
- export type ContractUncheckedUpdateWithoutDocumentsInput = {
2447
+ export type ContractUncheckedUpdateWithoutEventsInput = {
1027
2448
  id?: Prisma.StringFieldUpdateOperationsInput | string;
1028
- propertyId?: Prisma.StringFieldUpdateOperationsInput | string;
1029
- paymentPlanId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1030
- buyerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
2449
+ tenantId?: Prisma.StringFieldUpdateOperationsInput | string;
2450
+ propertyUnitId?: Prisma.StringFieldUpdateOperationsInput | string;
2451
+ buyerId?: Prisma.StringFieldUpdateOperationsInput | string;
1031
2452
  sellerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1032
- contractType?: Prisma.StringFieldUpdateOperationsInput | string;
2453
+ paymentMethodId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1033
2454
  contractNumber?: Prisma.StringFieldUpdateOperationsInput | string;
1034
2455
  title?: Prisma.StringFieldUpdateOperationsInput | string;
1035
2456
  description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
2457
+ contractType?: Prisma.StringFieldUpdateOperationsInput | string;
2458
+ totalAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
2459
+ downPayment?: Prisma.FloatFieldUpdateOperationsInput | number;
2460
+ downPaymentPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
2461
+ principal?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
2462
+ interestRate?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
2463
+ termMonths?: Prisma.NullableIntFieldUpdateOperationsInput | number | null;
2464
+ periodicPayment?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
2465
+ totalPaidToDate?: Prisma.FloatFieldUpdateOperationsInput | number;
2466
+ totalInterestPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
1036
2467
  status?: Prisma.StringFieldUpdateOperationsInput | string;
2468
+ state?: Prisma.StringFieldUpdateOperationsInput | string;
2469
+ currentPhaseId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
2470
+ nextPaymentDueDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
2471
+ lastReminderSentAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1037
2472
  startDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1038
2473
  endDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1039
2474
  signedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1040
2475
  terminatedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1041
2476
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
1042
2477
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
2478
+ phases?: Prisma.ContractPhaseUncheckedUpdateManyWithoutContractNestedInput;
2479
+ documents?: Prisma.ContractDocumentUncheckedUpdateManyWithoutContractNestedInput;
2480
+ payments?: Prisma.ContractPaymentUncheckedUpdateManyWithoutContractNestedInput;
2481
+ transitions?: Prisma.ContractTransitionUncheckedUpdateManyWithoutContractNestedInput;
1043
2482
  };
1044
2483
  export type ContractCreateManyBuyerInput = {
1045
2484
  id?: string;
1046
- propertyId: string;
1047
- paymentPlanId?: string | null;
2485
+ tenantId: string;
2486
+ propertyUnitId: string;
1048
2487
  sellerId?: string | null;
1049
- contractType: string;
2488
+ paymentMethodId?: string | null;
1050
2489
  contractNumber: string;
1051
2490
  title: string;
1052
2491
  description?: string | null;
2492
+ contractType: string;
2493
+ totalAmount: number;
2494
+ downPayment?: number;
2495
+ downPaymentPaid?: number;
2496
+ principal?: number | null;
2497
+ interestRate?: number | null;
2498
+ termMonths?: number | null;
2499
+ periodicPayment?: number | null;
2500
+ totalPaidToDate?: number;
2501
+ totalInterestPaid?: number;
1053
2502
  status?: string;
2503
+ state?: string;
2504
+ currentPhaseId?: string | null;
2505
+ nextPaymentDueDate?: Date | string | null;
2506
+ lastReminderSentAt?: Date | string | null;
1054
2507
  startDate?: Date | string | null;
1055
2508
  endDate?: Date | string | null;
1056
2509
  signedAt?: Date | string | null;
@@ -1060,14 +2513,28 @@ export type ContractCreateManyBuyerInput = {
1060
2513
  };
1061
2514
  export type ContractCreateManySellerInput = {
1062
2515
  id?: string;
1063
- propertyId: string;
1064
- paymentPlanId?: string | null;
1065
- buyerId?: string | null;
1066
- contractType: string;
2516
+ tenantId: string;
2517
+ propertyUnitId: string;
2518
+ buyerId: string;
2519
+ paymentMethodId?: string | null;
1067
2520
  contractNumber: string;
1068
2521
  title: string;
1069
2522
  description?: string | null;
2523
+ contractType: string;
2524
+ totalAmount: number;
2525
+ downPayment?: number;
2526
+ downPaymentPaid?: number;
2527
+ principal?: number | null;
2528
+ interestRate?: number | null;
2529
+ termMonths?: number | null;
2530
+ periodicPayment?: number | null;
2531
+ totalPaidToDate?: number;
2532
+ totalInterestPaid?: number;
1070
2533
  status?: string;
2534
+ state?: string;
2535
+ currentPhaseId?: string | null;
2536
+ nextPaymentDueDate?: Date | string | null;
2537
+ lastReminderSentAt?: Date | string | null;
1071
2538
  startDate?: Date | string | null;
1072
2539
  endDate?: Date | string | null;
1073
2540
  signedAt?: Date | string | null;
@@ -1077,50 +2544,100 @@ export type ContractCreateManySellerInput = {
1077
2544
  };
1078
2545
  export type ContractUpdateWithoutBuyerInput = {
1079
2546
  id?: Prisma.StringFieldUpdateOperationsInput | string;
1080
- contractType?: Prisma.StringFieldUpdateOperationsInput | string;
1081
2547
  contractNumber?: Prisma.StringFieldUpdateOperationsInput | string;
1082
2548
  title?: Prisma.StringFieldUpdateOperationsInput | string;
1083
2549
  description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
2550
+ contractType?: Prisma.StringFieldUpdateOperationsInput | string;
2551
+ totalAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
2552
+ downPayment?: Prisma.FloatFieldUpdateOperationsInput | number;
2553
+ downPaymentPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
2554
+ principal?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
2555
+ interestRate?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
2556
+ termMonths?: Prisma.NullableIntFieldUpdateOperationsInput | number | null;
2557
+ periodicPayment?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
2558
+ totalPaidToDate?: Prisma.FloatFieldUpdateOperationsInput | number;
2559
+ totalInterestPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
1084
2560
  status?: Prisma.StringFieldUpdateOperationsInput | string;
2561
+ state?: Prisma.StringFieldUpdateOperationsInput | string;
2562
+ currentPhaseId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
2563
+ nextPaymentDueDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
2564
+ lastReminderSentAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1085
2565
  startDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1086
2566
  endDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1087
2567
  signedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1088
2568
  terminatedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1089
2569
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
1090
2570
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
1091
- property?: Prisma.PropertyUpdateOneRequiredWithoutContractsNestedInput;
1092
- paymentPlan?: Prisma.PaymentPlanUpdateOneWithoutContractNestedInput;
2571
+ tenant?: Prisma.TenantUpdateOneRequiredWithoutContractsNestedInput;
2572
+ propertyUnit?: Prisma.PropertyUnitUpdateOneRequiredWithoutContractsNestedInput;
1093
2573
  seller?: Prisma.UserUpdateOneWithoutSoldContractsNestedInput;
2574
+ paymentMethod?: Prisma.PropertyPaymentMethodUpdateOneWithoutContractsNestedInput;
2575
+ phases?: Prisma.ContractPhaseUpdateManyWithoutContractNestedInput;
1094
2576
  documents?: Prisma.ContractDocumentUpdateManyWithoutContractNestedInput;
2577
+ payments?: Prisma.ContractPaymentUpdateManyWithoutContractNestedInput;
2578
+ transitions?: Prisma.ContractTransitionUpdateManyWithoutContractNestedInput;
2579
+ events?: Prisma.ContractEventUpdateManyWithoutContractNestedInput;
1095
2580
  };
1096
2581
  export type ContractUncheckedUpdateWithoutBuyerInput = {
1097
2582
  id?: Prisma.StringFieldUpdateOperationsInput | string;
1098
- propertyId?: Prisma.StringFieldUpdateOperationsInput | string;
1099
- paymentPlanId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
2583
+ tenantId?: Prisma.StringFieldUpdateOperationsInput | string;
2584
+ propertyUnitId?: Prisma.StringFieldUpdateOperationsInput | string;
1100
2585
  sellerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1101
- contractType?: Prisma.StringFieldUpdateOperationsInput | string;
2586
+ paymentMethodId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1102
2587
  contractNumber?: Prisma.StringFieldUpdateOperationsInput | string;
1103
2588
  title?: Prisma.StringFieldUpdateOperationsInput | string;
1104
2589
  description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
2590
+ contractType?: Prisma.StringFieldUpdateOperationsInput | string;
2591
+ totalAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
2592
+ downPayment?: Prisma.FloatFieldUpdateOperationsInput | number;
2593
+ downPaymentPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
2594
+ principal?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
2595
+ interestRate?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
2596
+ termMonths?: Prisma.NullableIntFieldUpdateOperationsInput | number | null;
2597
+ periodicPayment?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
2598
+ totalPaidToDate?: Prisma.FloatFieldUpdateOperationsInput | number;
2599
+ totalInterestPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
1105
2600
  status?: Prisma.StringFieldUpdateOperationsInput | string;
2601
+ state?: Prisma.StringFieldUpdateOperationsInput | string;
2602
+ currentPhaseId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
2603
+ nextPaymentDueDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
2604
+ lastReminderSentAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1106
2605
  startDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1107
2606
  endDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1108
2607
  signedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1109
2608
  terminatedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1110
2609
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
1111
2610
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
2611
+ phases?: Prisma.ContractPhaseUncheckedUpdateManyWithoutContractNestedInput;
1112
2612
  documents?: Prisma.ContractDocumentUncheckedUpdateManyWithoutContractNestedInput;
2613
+ payments?: Prisma.ContractPaymentUncheckedUpdateManyWithoutContractNestedInput;
2614
+ transitions?: Prisma.ContractTransitionUncheckedUpdateManyWithoutContractNestedInput;
2615
+ events?: Prisma.ContractEventUncheckedUpdateManyWithoutContractNestedInput;
1113
2616
  };
1114
2617
  export type ContractUncheckedUpdateManyWithoutBuyerInput = {
1115
2618
  id?: Prisma.StringFieldUpdateOperationsInput | string;
1116
- propertyId?: Prisma.StringFieldUpdateOperationsInput | string;
1117
- paymentPlanId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
2619
+ tenantId?: Prisma.StringFieldUpdateOperationsInput | string;
2620
+ propertyUnitId?: Prisma.StringFieldUpdateOperationsInput | string;
1118
2621
  sellerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1119
- contractType?: Prisma.StringFieldUpdateOperationsInput | string;
2622
+ paymentMethodId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1120
2623
  contractNumber?: Prisma.StringFieldUpdateOperationsInput | string;
1121
2624
  title?: Prisma.StringFieldUpdateOperationsInput | string;
1122
2625
  description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
2626
+ contractType?: Prisma.StringFieldUpdateOperationsInput | string;
2627
+ totalAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
2628
+ downPayment?: Prisma.FloatFieldUpdateOperationsInput | number;
2629
+ downPaymentPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
2630
+ principal?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
2631
+ interestRate?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
2632
+ termMonths?: Prisma.NullableIntFieldUpdateOperationsInput | number | null;
2633
+ periodicPayment?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
2634
+ totalPaidToDate?: Prisma.FloatFieldUpdateOperationsInput | number;
2635
+ totalInterestPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
1123
2636
  status?: Prisma.StringFieldUpdateOperationsInput | string;
2637
+ state?: Prisma.StringFieldUpdateOperationsInput | string;
2638
+ currentPhaseId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
2639
+ nextPaymentDueDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
2640
+ lastReminderSentAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1124
2641
  startDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1125
2642
  endDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1126
2643
  signedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
@@ -1130,50 +2647,100 @@ export type ContractUncheckedUpdateManyWithoutBuyerInput = {
1130
2647
  };
1131
2648
  export type ContractUpdateWithoutSellerInput = {
1132
2649
  id?: Prisma.StringFieldUpdateOperationsInput | string;
1133
- contractType?: Prisma.StringFieldUpdateOperationsInput | string;
1134
2650
  contractNumber?: Prisma.StringFieldUpdateOperationsInput | string;
1135
2651
  title?: Prisma.StringFieldUpdateOperationsInput | string;
1136
2652
  description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
2653
+ contractType?: Prisma.StringFieldUpdateOperationsInput | string;
2654
+ totalAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
2655
+ downPayment?: Prisma.FloatFieldUpdateOperationsInput | number;
2656
+ downPaymentPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
2657
+ principal?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
2658
+ interestRate?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
2659
+ termMonths?: Prisma.NullableIntFieldUpdateOperationsInput | number | null;
2660
+ periodicPayment?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
2661
+ totalPaidToDate?: Prisma.FloatFieldUpdateOperationsInput | number;
2662
+ totalInterestPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
1137
2663
  status?: Prisma.StringFieldUpdateOperationsInput | string;
2664
+ state?: Prisma.StringFieldUpdateOperationsInput | string;
2665
+ currentPhaseId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
2666
+ nextPaymentDueDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
2667
+ lastReminderSentAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1138
2668
  startDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1139
2669
  endDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1140
2670
  signedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1141
2671
  terminatedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1142
2672
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
1143
2673
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
1144
- property?: Prisma.PropertyUpdateOneRequiredWithoutContractsNestedInput;
1145
- paymentPlan?: Prisma.PaymentPlanUpdateOneWithoutContractNestedInput;
1146
- buyer?: Prisma.UserUpdateOneWithoutContractsNestedInput;
2674
+ tenant?: Prisma.TenantUpdateOneRequiredWithoutContractsNestedInput;
2675
+ propertyUnit?: Prisma.PropertyUnitUpdateOneRequiredWithoutContractsNestedInput;
2676
+ buyer?: Prisma.UserUpdateOneRequiredWithoutContractsNestedInput;
2677
+ paymentMethod?: Prisma.PropertyPaymentMethodUpdateOneWithoutContractsNestedInput;
2678
+ phases?: Prisma.ContractPhaseUpdateManyWithoutContractNestedInput;
1147
2679
  documents?: Prisma.ContractDocumentUpdateManyWithoutContractNestedInput;
2680
+ payments?: Prisma.ContractPaymentUpdateManyWithoutContractNestedInput;
2681
+ transitions?: Prisma.ContractTransitionUpdateManyWithoutContractNestedInput;
2682
+ events?: Prisma.ContractEventUpdateManyWithoutContractNestedInput;
1148
2683
  };
1149
2684
  export type ContractUncheckedUpdateWithoutSellerInput = {
1150
2685
  id?: Prisma.StringFieldUpdateOperationsInput | string;
1151
- propertyId?: Prisma.StringFieldUpdateOperationsInput | string;
1152
- paymentPlanId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1153
- buyerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1154
- contractType?: Prisma.StringFieldUpdateOperationsInput | string;
2686
+ tenantId?: Prisma.StringFieldUpdateOperationsInput | string;
2687
+ propertyUnitId?: Prisma.StringFieldUpdateOperationsInput | string;
2688
+ buyerId?: Prisma.StringFieldUpdateOperationsInput | string;
2689
+ paymentMethodId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1155
2690
  contractNumber?: Prisma.StringFieldUpdateOperationsInput | string;
1156
2691
  title?: Prisma.StringFieldUpdateOperationsInput | string;
1157
2692
  description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
2693
+ contractType?: Prisma.StringFieldUpdateOperationsInput | string;
2694
+ totalAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
2695
+ downPayment?: Prisma.FloatFieldUpdateOperationsInput | number;
2696
+ downPaymentPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
2697
+ principal?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
2698
+ interestRate?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
2699
+ termMonths?: Prisma.NullableIntFieldUpdateOperationsInput | number | null;
2700
+ periodicPayment?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
2701
+ totalPaidToDate?: Prisma.FloatFieldUpdateOperationsInput | number;
2702
+ totalInterestPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
1158
2703
  status?: Prisma.StringFieldUpdateOperationsInput | string;
2704
+ state?: Prisma.StringFieldUpdateOperationsInput | string;
2705
+ currentPhaseId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
2706
+ nextPaymentDueDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
2707
+ lastReminderSentAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1159
2708
  startDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1160
2709
  endDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1161
2710
  signedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1162
2711
  terminatedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1163
2712
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
1164
2713
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
2714
+ phases?: Prisma.ContractPhaseUncheckedUpdateManyWithoutContractNestedInput;
1165
2715
  documents?: Prisma.ContractDocumentUncheckedUpdateManyWithoutContractNestedInput;
2716
+ payments?: Prisma.ContractPaymentUncheckedUpdateManyWithoutContractNestedInput;
2717
+ transitions?: Prisma.ContractTransitionUncheckedUpdateManyWithoutContractNestedInput;
2718
+ events?: Prisma.ContractEventUncheckedUpdateManyWithoutContractNestedInput;
1166
2719
  };
1167
2720
  export type ContractUncheckedUpdateManyWithoutSellerInput = {
1168
2721
  id?: Prisma.StringFieldUpdateOperationsInput | string;
1169
- propertyId?: Prisma.StringFieldUpdateOperationsInput | string;
1170
- paymentPlanId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1171
- buyerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1172
- contractType?: Prisma.StringFieldUpdateOperationsInput | string;
2722
+ tenantId?: Prisma.StringFieldUpdateOperationsInput | string;
2723
+ propertyUnitId?: Prisma.StringFieldUpdateOperationsInput | string;
2724
+ buyerId?: Prisma.StringFieldUpdateOperationsInput | string;
2725
+ paymentMethodId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1173
2726
  contractNumber?: Prisma.StringFieldUpdateOperationsInput | string;
1174
2727
  title?: Prisma.StringFieldUpdateOperationsInput | string;
1175
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;
1176
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;
1177
2744
  startDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1178
2745
  endDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1179
2746
  signedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
@@ -1181,16 +2748,30 @@ export type ContractUncheckedUpdateManyWithoutSellerInput = {
1181
2748
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
1182
2749
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
1183
2750
  };
1184
- export type ContractCreateManyPropertyInput = {
2751
+ export type ContractCreateManyTenantInput = {
1185
2752
  id?: string;
1186
- paymentPlanId?: string | null;
1187
- buyerId?: string | null;
2753
+ propertyUnitId: string;
2754
+ buyerId: string;
1188
2755
  sellerId?: string | null;
1189
- contractType: string;
2756
+ paymentMethodId?: string | null;
1190
2757
  contractNumber: string;
1191
2758
  title: string;
1192
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;
1193
2770
  status?: string;
2771
+ state?: string;
2772
+ currentPhaseId?: string | null;
2773
+ nextPaymentDueDate?: Date | string | null;
2774
+ lastReminderSentAt?: Date | string | null;
1194
2775
  startDate?: Date | string | null;
1195
2776
  endDate?: Date | string | null;
1196
2777
  signedAt?: Date | string | null;
@@ -1198,52 +2779,370 @@ export type ContractCreateManyPropertyInput = {
1198
2779
  createdAt?: Date | string;
1199
2780
  updatedAt?: Date | string;
1200
2781
  };
1201
- export type ContractUpdateWithoutPropertyInput = {
2782
+ export type ContractUpdateWithoutTenantInput = {
1202
2783
  id?: Prisma.StringFieldUpdateOperationsInput | string;
1203
- contractType?: Prisma.StringFieldUpdateOperationsInput | string;
1204
2784
  contractNumber?: Prisma.StringFieldUpdateOperationsInput | string;
1205
2785
  title?: Prisma.StringFieldUpdateOperationsInput | string;
1206
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;
1207
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;
1208
2802
  startDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1209
2803
  endDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1210
2804
  signedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1211
2805
  terminatedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1212
2806
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
1213
2807
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
1214
- paymentPlan?: Prisma.PaymentPlanUpdateOneWithoutContractNestedInput;
1215
- buyer?: Prisma.UserUpdateOneWithoutContractsNestedInput;
2808
+ propertyUnit?: Prisma.PropertyUnitUpdateOneRequiredWithoutContractsNestedInput;
2809
+ buyer?: Prisma.UserUpdateOneRequiredWithoutContractsNestedInput;
1216
2810
  seller?: Prisma.UserUpdateOneWithoutSoldContractsNestedInput;
2811
+ paymentMethod?: Prisma.PropertyPaymentMethodUpdateOneWithoutContractsNestedInput;
2812
+ phases?: Prisma.ContractPhaseUpdateManyWithoutContractNestedInput;
1217
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;
1218
2853
  };
1219
- export type ContractUncheckedUpdateWithoutPropertyInput = {
2854
+ export type ContractUncheckedUpdateManyWithoutTenantInput = {
1220
2855
  id?: Prisma.StringFieldUpdateOperationsInput | string;
1221
- paymentPlanId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1222
- buyerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
2856
+ propertyUnitId?: Prisma.StringFieldUpdateOperationsInput | string;
2857
+ buyerId?: Prisma.StringFieldUpdateOperationsInput | string;
1223
2858
  sellerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
2859
+ paymentMethodId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
2860
+ contractNumber?: Prisma.StringFieldUpdateOperationsInput | string;
2861
+ title?: Prisma.StringFieldUpdateOperationsInput | string;
2862
+ description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
2863
+ contractType?: Prisma.StringFieldUpdateOperationsInput | string;
2864
+ totalAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
2865
+ downPayment?: Prisma.FloatFieldUpdateOperationsInput | number;
2866
+ downPaymentPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
2867
+ principal?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
2868
+ interestRate?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
2869
+ termMonths?: Prisma.NullableIntFieldUpdateOperationsInput | number | null;
2870
+ periodicPayment?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
2871
+ totalPaidToDate?: Prisma.FloatFieldUpdateOperationsInput | number;
2872
+ totalInterestPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
2873
+ status?: Prisma.StringFieldUpdateOperationsInput | string;
2874
+ state?: Prisma.StringFieldUpdateOperationsInput | string;
2875
+ currentPhaseId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
2876
+ nextPaymentDueDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
2877
+ lastReminderSentAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
2878
+ startDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
2879
+ endDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
2880
+ signedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
2881
+ terminatedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
2882
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
2883
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
2884
+ };
2885
+ export type ContractCreateManyPropertyUnitInput = {
2886
+ id?: string;
2887
+ tenantId: string;
2888
+ buyerId: string;
2889
+ sellerId?: string | null;
2890
+ paymentMethodId?: string | null;
2891
+ contractNumber: string;
2892
+ title: string;
2893
+ description?: string | null;
2894
+ contractType: string;
2895
+ totalAmount: number;
2896
+ downPayment?: number;
2897
+ downPaymentPaid?: number;
2898
+ principal?: number | null;
2899
+ interestRate?: number | null;
2900
+ termMonths?: number | null;
2901
+ periodicPayment?: number | null;
2902
+ totalPaidToDate?: number;
2903
+ totalInterestPaid?: number;
2904
+ status?: string;
2905
+ state?: string;
2906
+ currentPhaseId?: string | null;
2907
+ nextPaymentDueDate?: Date | string | null;
2908
+ lastReminderSentAt?: Date | string | null;
2909
+ startDate?: Date | string | null;
2910
+ endDate?: Date | string | null;
2911
+ signedAt?: Date | string | null;
2912
+ terminatedAt?: Date | string | null;
2913
+ createdAt?: Date | string;
2914
+ updatedAt?: Date | string;
2915
+ };
2916
+ export type ContractUpdateWithoutPropertyUnitInput = {
2917
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
2918
+ contractNumber?: Prisma.StringFieldUpdateOperationsInput | string;
2919
+ title?: Prisma.StringFieldUpdateOperationsInput | string;
2920
+ description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1224
2921
  contractType?: Prisma.StringFieldUpdateOperationsInput | string;
2922
+ totalAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
2923
+ downPayment?: Prisma.FloatFieldUpdateOperationsInput | number;
2924
+ downPaymentPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
2925
+ principal?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
2926
+ interestRate?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
2927
+ termMonths?: Prisma.NullableIntFieldUpdateOperationsInput | number | null;
2928
+ periodicPayment?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
2929
+ totalPaidToDate?: Prisma.FloatFieldUpdateOperationsInput | number;
2930
+ totalInterestPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
2931
+ status?: Prisma.StringFieldUpdateOperationsInput | string;
2932
+ state?: Prisma.StringFieldUpdateOperationsInput | string;
2933
+ currentPhaseId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
2934
+ nextPaymentDueDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
2935
+ lastReminderSentAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
2936
+ startDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
2937
+ endDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
2938
+ signedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
2939
+ terminatedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
2940
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
2941
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
2942
+ tenant?: Prisma.TenantUpdateOneRequiredWithoutContractsNestedInput;
2943
+ buyer?: Prisma.UserUpdateOneRequiredWithoutContractsNestedInput;
2944
+ seller?: Prisma.UserUpdateOneWithoutSoldContractsNestedInput;
2945
+ paymentMethod?: Prisma.PropertyPaymentMethodUpdateOneWithoutContractsNestedInput;
2946
+ phases?: Prisma.ContractPhaseUpdateManyWithoutContractNestedInput;
2947
+ documents?: Prisma.ContractDocumentUpdateManyWithoutContractNestedInput;
2948
+ payments?: Prisma.ContractPaymentUpdateManyWithoutContractNestedInput;
2949
+ transitions?: Prisma.ContractTransitionUpdateManyWithoutContractNestedInput;
2950
+ events?: Prisma.ContractEventUpdateManyWithoutContractNestedInput;
2951
+ };
2952
+ export type ContractUncheckedUpdateWithoutPropertyUnitInput = {
2953
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
2954
+ tenantId?: Prisma.StringFieldUpdateOperationsInput | string;
2955
+ buyerId?: Prisma.StringFieldUpdateOperationsInput | string;
2956
+ sellerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
2957
+ paymentMethodId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1225
2958
  contractNumber?: Prisma.StringFieldUpdateOperationsInput | string;
1226
2959
  title?: Prisma.StringFieldUpdateOperationsInput | string;
1227
2960
  description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
2961
+ contractType?: Prisma.StringFieldUpdateOperationsInput | string;
2962
+ totalAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
2963
+ downPayment?: Prisma.FloatFieldUpdateOperationsInput | number;
2964
+ downPaymentPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
2965
+ principal?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
2966
+ interestRate?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
2967
+ termMonths?: Prisma.NullableIntFieldUpdateOperationsInput | number | null;
2968
+ periodicPayment?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
2969
+ totalPaidToDate?: Prisma.FloatFieldUpdateOperationsInput | number;
2970
+ totalInterestPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
1228
2971
  status?: Prisma.StringFieldUpdateOperationsInput | string;
2972
+ state?: Prisma.StringFieldUpdateOperationsInput | string;
2973
+ currentPhaseId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
2974
+ nextPaymentDueDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
2975
+ lastReminderSentAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1229
2976
  startDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1230
2977
  endDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1231
2978
  signedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1232
2979
  terminatedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1233
2980
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
1234
2981
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
2982
+ phases?: Prisma.ContractPhaseUncheckedUpdateManyWithoutContractNestedInput;
1235
2983
  documents?: Prisma.ContractDocumentUncheckedUpdateManyWithoutContractNestedInput;
2984
+ payments?: Prisma.ContractPaymentUncheckedUpdateManyWithoutContractNestedInput;
2985
+ transitions?: Prisma.ContractTransitionUncheckedUpdateManyWithoutContractNestedInput;
2986
+ events?: Prisma.ContractEventUncheckedUpdateManyWithoutContractNestedInput;
2987
+ };
2988
+ export type ContractUncheckedUpdateManyWithoutPropertyUnitInput = {
2989
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
2990
+ tenantId?: Prisma.StringFieldUpdateOperationsInput | string;
2991
+ buyerId?: Prisma.StringFieldUpdateOperationsInput | string;
2992
+ sellerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
2993
+ paymentMethodId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
2994
+ contractNumber?: Prisma.StringFieldUpdateOperationsInput | string;
2995
+ title?: Prisma.StringFieldUpdateOperationsInput | string;
2996
+ description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
2997
+ contractType?: Prisma.StringFieldUpdateOperationsInput | string;
2998
+ totalAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
2999
+ downPayment?: Prisma.FloatFieldUpdateOperationsInput | number;
3000
+ downPaymentPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
3001
+ principal?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
3002
+ interestRate?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
3003
+ termMonths?: Prisma.NullableIntFieldUpdateOperationsInput | number | null;
3004
+ periodicPayment?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
3005
+ totalPaidToDate?: Prisma.FloatFieldUpdateOperationsInput | number;
3006
+ totalInterestPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
3007
+ status?: Prisma.StringFieldUpdateOperationsInput | string;
3008
+ state?: Prisma.StringFieldUpdateOperationsInput | string;
3009
+ currentPhaseId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
3010
+ nextPaymentDueDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
3011
+ lastReminderSentAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
3012
+ startDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
3013
+ endDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
3014
+ signedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
3015
+ terminatedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
3016
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
3017
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
1236
3018
  };
1237
- export type ContractUncheckedUpdateManyWithoutPropertyInput = {
3019
+ export type ContractCreateManyPaymentMethodInput = {
3020
+ id?: string;
3021
+ tenantId: string;
3022
+ propertyUnitId: string;
3023
+ buyerId: string;
3024
+ sellerId?: string | null;
3025
+ contractNumber: string;
3026
+ title: string;
3027
+ description?: string | null;
3028
+ contractType: string;
3029
+ totalAmount: number;
3030
+ downPayment?: number;
3031
+ downPaymentPaid?: number;
3032
+ principal?: number | null;
3033
+ interestRate?: number | null;
3034
+ termMonths?: number | null;
3035
+ periodicPayment?: number | null;
3036
+ totalPaidToDate?: number;
3037
+ totalInterestPaid?: number;
3038
+ status?: string;
3039
+ state?: string;
3040
+ currentPhaseId?: string | null;
3041
+ nextPaymentDueDate?: Date | string | null;
3042
+ lastReminderSentAt?: Date | string | null;
3043
+ startDate?: Date | string | null;
3044
+ endDate?: Date | string | null;
3045
+ signedAt?: Date | string | null;
3046
+ terminatedAt?: Date | string | null;
3047
+ createdAt?: Date | string;
3048
+ updatedAt?: Date | string;
3049
+ };
3050
+ export type ContractUpdateWithoutPaymentMethodInput = {
3051
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
3052
+ contractNumber?: Prisma.StringFieldUpdateOperationsInput | string;
3053
+ title?: Prisma.StringFieldUpdateOperationsInput | string;
3054
+ description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
3055
+ contractType?: Prisma.StringFieldUpdateOperationsInput | string;
3056
+ totalAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
3057
+ downPayment?: Prisma.FloatFieldUpdateOperationsInput | number;
3058
+ downPaymentPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
3059
+ principal?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
3060
+ interestRate?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
3061
+ termMonths?: Prisma.NullableIntFieldUpdateOperationsInput | number | null;
3062
+ periodicPayment?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
3063
+ totalPaidToDate?: Prisma.FloatFieldUpdateOperationsInput | number;
3064
+ totalInterestPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
3065
+ status?: Prisma.StringFieldUpdateOperationsInput | string;
3066
+ state?: Prisma.StringFieldUpdateOperationsInput | string;
3067
+ currentPhaseId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
3068
+ nextPaymentDueDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
3069
+ lastReminderSentAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
3070
+ startDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
3071
+ endDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
3072
+ signedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
3073
+ terminatedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
3074
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
3075
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
3076
+ tenant?: Prisma.TenantUpdateOneRequiredWithoutContractsNestedInput;
3077
+ propertyUnit?: Prisma.PropertyUnitUpdateOneRequiredWithoutContractsNestedInput;
3078
+ buyer?: Prisma.UserUpdateOneRequiredWithoutContractsNestedInput;
3079
+ seller?: Prisma.UserUpdateOneWithoutSoldContractsNestedInput;
3080
+ phases?: Prisma.ContractPhaseUpdateManyWithoutContractNestedInput;
3081
+ documents?: Prisma.ContractDocumentUpdateManyWithoutContractNestedInput;
3082
+ payments?: Prisma.ContractPaymentUpdateManyWithoutContractNestedInput;
3083
+ transitions?: Prisma.ContractTransitionUpdateManyWithoutContractNestedInput;
3084
+ events?: Prisma.ContractEventUpdateManyWithoutContractNestedInput;
3085
+ };
3086
+ export type ContractUncheckedUpdateWithoutPaymentMethodInput = {
1238
3087
  id?: Prisma.StringFieldUpdateOperationsInput | string;
1239
- paymentPlanId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1240
- buyerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
3088
+ tenantId?: Prisma.StringFieldUpdateOperationsInput | string;
3089
+ propertyUnitId?: Prisma.StringFieldUpdateOperationsInput | string;
3090
+ buyerId?: Prisma.StringFieldUpdateOperationsInput | string;
1241
3091
  sellerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
3092
+ contractNumber?: Prisma.StringFieldUpdateOperationsInput | string;
3093
+ title?: Prisma.StringFieldUpdateOperationsInput | string;
3094
+ description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1242
3095
  contractType?: Prisma.StringFieldUpdateOperationsInput | string;
3096
+ totalAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
3097
+ downPayment?: Prisma.FloatFieldUpdateOperationsInput | number;
3098
+ downPaymentPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
3099
+ principal?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
3100
+ interestRate?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
3101
+ termMonths?: Prisma.NullableIntFieldUpdateOperationsInput | number | null;
3102
+ periodicPayment?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
3103
+ totalPaidToDate?: Prisma.FloatFieldUpdateOperationsInput | number;
3104
+ totalInterestPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
3105
+ status?: Prisma.StringFieldUpdateOperationsInput | string;
3106
+ state?: Prisma.StringFieldUpdateOperationsInput | string;
3107
+ currentPhaseId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
3108
+ nextPaymentDueDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
3109
+ lastReminderSentAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
3110
+ startDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
3111
+ endDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
3112
+ signedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
3113
+ terminatedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
3114
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
3115
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
3116
+ phases?: Prisma.ContractPhaseUncheckedUpdateManyWithoutContractNestedInput;
3117
+ documents?: Prisma.ContractDocumentUncheckedUpdateManyWithoutContractNestedInput;
3118
+ payments?: Prisma.ContractPaymentUncheckedUpdateManyWithoutContractNestedInput;
3119
+ transitions?: Prisma.ContractTransitionUncheckedUpdateManyWithoutContractNestedInput;
3120
+ events?: Prisma.ContractEventUncheckedUpdateManyWithoutContractNestedInput;
3121
+ };
3122
+ export type ContractUncheckedUpdateManyWithoutPaymentMethodInput = {
3123
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
3124
+ tenantId?: Prisma.StringFieldUpdateOperationsInput | string;
3125
+ propertyUnitId?: Prisma.StringFieldUpdateOperationsInput | string;
3126
+ buyerId?: Prisma.StringFieldUpdateOperationsInput | string;
3127
+ sellerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1243
3128
  contractNumber?: Prisma.StringFieldUpdateOperationsInput | string;
1244
3129
  title?: Prisma.StringFieldUpdateOperationsInput | string;
1245
3130
  description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
3131
+ contractType?: Prisma.StringFieldUpdateOperationsInput | string;
3132
+ totalAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
3133
+ downPayment?: Prisma.FloatFieldUpdateOperationsInput | number;
3134
+ downPaymentPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
3135
+ principal?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
3136
+ interestRate?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
3137
+ termMonths?: Prisma.NullableIntFieldUpdateOperationsInput | number | null;
3138
+ periodicPayment?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
3139
+ totalPaidToDate?: Prisma.FloatFieldUpdateOperationsInput | number;
3140
+ totalInterestPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
1246
3141
  status?: Prisma.StringFieldUpdateOperationsInput | string;
3142
+ state?: Prisma.StringFieldUpdateOperationsInput | string;
3143
+ currentPhaseId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
3144
+ nextPaymentDueDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
3145
+ lastReminderSentAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1247
3146
  startDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1248
3147
  endDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1249
3148
  signedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
@@ -1255,10 +3154,18 @@ export type ContractUncheckedUpdateManyWithoutPropertyInput = {
1255
3154
  * Count Type ContractCountOutputType
1256
3155
  */
1257
3156
  export type ContractCountOutputType = {
3157
+ phases: number;
1258
3158
  documents: number;
3159
+ payments: number;
3160
+ transitions: number;
3161
+ events: number;
1259
3162
  };
1260
3163
  export type ContractCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
3164
+ phases?: boolean | ContractCountOutputTypeCountPhasesArgs;
1261
3165
  documents?: boolean | ContractCountOutputTypeCountDocumentsArgs;
3166
+ payments?: boolean | ContractCountOutputTypeCountPaymentsArgs;
3167
+ transitions?: boolean | ContractCountOutputTypeCountTransitionsArgs;
3168
+ events?: boolean | ContractCountOutputTypeCountEventsArgs;
1262
3169
  };
1263
3170
  /**
1264
3171
  * ContractCountOutputType without action
@@ -1269,47 +3176,104 @@ export type ContractCountOutputTypeDefaultArgs<ExtArgs extends runtime.Types.Ext
1269
3176
  */
1270
3177
  select?: Prisma.ContractCountOutputTypeSelect<ExtArgs> | null;
1271
3178
  };
3179
+ /**
3180
+ * ContractCountOutputType without action
3181
+ */
3182
+ export type ContractCountOutputTypeCountPhasesArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
3183
+ where?: Prisma.ContractPhaseWhereInput;
3184
+ };
1272
3185
  /**
1273
3186
  * ContractCountOutputType without action
1274
3187
  */
1275
3188
  export type ContractCountOutputTypeCountDocumentsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1276
3189
  where?: Prisma.ContractDocumentWhereInput;
1277
3190
  };
3191
+ /**
3192
+ * ContractCountOutputType without action
3193
+ */
3194
+ export type ContractCountOutputTypeCountPaymentsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
3195
+ where?: Prisma.ContractPaymentWhereInput;
3196
+ };
3197
+ /**
3198
+ * ContractCountOutputType without action
3199
+ */
3200
+ export type ContractCountOutputTypeCountTransitionsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
3201
+ where?: Prisma.ContractTransitionWhereInput;
3202
+ };
3203
+ /**
3204
+ * ContractCountOutputType without action
3205
+ */
3206
+ export type ContractCountOutputTypeCountEventsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
3207
+ where?: Prisma.ContractEventWhereInput;
3208
+ };
1278
3209
  export type ContractSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
1279
3210
  id?: boolean;
1280
- propertyId?: boolean;
1281
- paymentPlanId?: boolean;
3211
+ tenantId?: boolean;
3212
+ propertyUnitId?: boolean;
1282
3213
  buyerId?: boolean;
1283
3214
  sellerId?: boolean;
1284
- contractType?: boolean;
3215
+ paymentMethodId?: boolean;
1285
3216
  contractNumber?: boolean;
1286
3217
  title?: boolean;
1287
3218
  description?: boolean;
3219
+ contractType?: boolean;
3220
+ totalAmount?: boolean;
3221
+ downPayment?: boolean;
3222
+ downPaymentPaid?: boolean;
3223
+ principal?: boolean;
3224
+ interestRate?: boolean;
3225
+ termMonths?: boolean;
3226
+ periodicPayment?: boolean;
3227
+ totalPaidToDate?: boolean;
3228
+ totalInterestPaid?: boolean;
1288
3229
  status?: boolean;
3230
+ state?: boolean;
3231
+ currentPhaseId?: boolean;
3232
+ nextPaymentDueDate?: boolean;
3233
+ lastReminderSentAt?: boolean;
1289
3234
  startDate?: boolean;
1290
3235
  endDate?: boolean;
1291
3236
  signedAt?: boolean;
1292
3237
  terminatedAt?: boolean;
1293
3238
  createdAt?: boolean;
1294
3239
  updatedAt?: boolean;
1295
- property?: boolean | Prisma.PropertyDefaultArgs<ExtArgs>;
1296
- paymentPlan?: boolean | Prisma.Contract$paymentPlanArgs<ExtArgs>;
1297
- buyer?: boolean | Prisma.Contract$buyerArgs<ExtArgs>;
3240
+ tenant?: boolean | Prisma.TenantDefaultArgs<ExtArgs>;
3241
+ propertyUnit?: boolean | Prisma.PropertyUnitDefaultArgs<ExtArgs>;
3242
+ buyer?: boolean | Prisma.UserDefaultArgs<ExtArgs>;
1298
3243
  seller?: boolean | Prisma.Contract$sellerArgs<ExtArgs>;
3244
+ paymentMethod?: boolean | Prisma.Contract$paymentMethodArgs<ExtArgs>;
3245
+ phases?: boolean | Prisma.Contract$phasesArgs<ExtArgs>;
1299
3246
  documents?: boolean | Prisma.Contract$documentsArgs<ExtArgs>;
3247
+ payments?: boolean | Prisma.Contract$paymentsArgs<ExtArgs>;
3248
+ transitions?: boolean | Prisma.Contract$transitionsArgs<ExtArgs>;
3249
+ events?: boolean | Prisma.Contract$eventsArgs<ExtArgs>;
1300
3250
  _count?: boolean | Prisma.ContractCountOutputTypeDefaultArgs<ExtArgs>;
1301
3251
  }, ExtArgs["result"]["contract"]>;
1302
3252
  export type ContractSelectScalar = {
1303
3253
  id?: boolean;
1304
- propertyId?: boolean;
1305
- paymentPlanId?: boolean;
3254
+ tenantId?: boolean;
3255
+ propertyUnitId?: boolean;
1306
3256
  buyerId?: boolean;
1307
3257
  sellerId?: boolean;
1308
- contractType?: boolean;
3258
+ paymentMethodId?: boolean;
1309
3259
  contractNumber?: boolean;
1310
3260
  title?: boolean;
1311
3261
  description?: boolean;
3262
+ contractType?: boolean;
3263
+ totalAmount?: boolean;
3264
+ downPayment?: boolean;
3265
+ downPaymentPaid?: boolean;
3266
+ principal?: boolean;
3267
+ interestRate?: boolean;
3268
+ termMonths?: boolean;
3269
+ periodicPayment?: boolean;
3270
+ totalPaidToDate?: boolean;
3271
+ totalInterestPaid?: boolean;
1312
3272
  status?: boolean;
3273
+ state?: boolean;
3274
+ currentPhaseId?: boolean;
3275
+ nextPaymentDueDate?: boolean;
3276
+ lastReminderSentAt?: boolean;
1313
3277
  startDate?: boolean;
1314
3278
  endDate?: boolean;
1315
3279
  signedAt?: boolean;
@@ -1317,35 +3281,59 @@ export type ContractSelectScalar = {
1317
3281
  createdAt?: boolean;
1318
3282
  updatedAt?: boolean;
1319
3283
  };
1320
- export type ContractOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "propertyId" | "paymentPlanId" | "buyerId" | "sellerId" | "contractType" | "contractNumber" | "title" | "description" | "status" | "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"]>;
1321
3285
  export type ContractInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1322
- property?: boolean | Prisma.PropertyDefaultArgs<ExtArgs>;
1323
- paymentPlan?: boolean | Prisma.Contract$paymentPlanArgs<ExtArgs>;
1324
- buyer?: boolean | Prisma.Contract$buyerArgs<ExtArgs>;
3286
+ tenant?: boolean | Prisma.TenantDefaultArgs<ExtArgs>;
3287
+ propertyUnit?: boolean | Prisma.PropertyUnitDefaultArgs<ExtArgs>;
3288
+ buyer?: boolean | Prisma.UserDefaultArgs<ExtArgs>;
1325
3289
  seller?: boolean | Prisma.Contract$sellerArgs<ExtArgs>;
3290
+ paymentMethod?: boolean | Prisma.Contract$paymentMethodArgs<ExtArgs>;
3291
+ phases?: boolean | Prisma.Contract$phasesArgs<ExtArgs>;
1326
3292
  documents?: boolean | Prisma.Contract$documentsArgs<ExtArgs>;
3293
+ payments?: boolean | Prisma.Contract$paymentsArgs<ExtArgs>;
3294
+ transitions?: boolean | Prisma.Contract$transitionsArgs<ExtArgs>;
3295
+ events?: boolean | Prisma.Contract$eventsArgs<ExtArgs>;
1327
3296
  _count?: boolean | Prisma.ContractCountOutputTypeDefaultArgs<ExtArgs>;
1328
3297
  };
1329
3298
  export type $ContractPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1330
3299
  name: "Contract";
1331
3300
  objects: {
1332
- property: Prisma.$PropertyPayload<ExtArgs>;
1333
- paymentPlan: Prisma.$PaymentPlanPayload<ExtArgs> | null;
1334
- buyer: Prisma.$UserPayload<ExtArgs> | null;
3301
+ tenant: Prisma.$TenantPayload<ExtArgs>;
3302
+ propertyUnit: Prisma.$PropertyUnitPayload<ExtArgs>;
3303
+ buyer: Prisma.$UserPayload<ExtArgs>;
1335
3304
  seller: Prisma.$UserPayload<ExtArgs> | null;
3305
+ paymentMethod: Prisma.$PropertyPaymentMethodPayload<ExtArgs> | null;
3306
+ phases: Prisma.$ContractPhasePayload<ExtArgs>[];
1336
3307
  documents: Prisma.$ContractDocumentPayload<ExtArgs>[];
3308
+ payments: Prisma.$ContractPaymentPayload<ExtArgs>[];
3309
+ transitions: Prisma.$ContractTransitionPayload<ExtArgs>[];
3310
+ events: Prisma.$ContractEventPayload<ExtArgs>[];
1337
3311
  };
1338
3312
  scalars: runtime.Types.Extensions.GetPayloadResult<{
1339
3313
  id: string;
1340
- propertyId: string;
1341
- paymentPlanId: string | null;
1342
- buyerId: string | null;
3314
+ tenantId: string;
3315
+ propertyUnitId: string;
3316
+ buyerId: string;
1343
3317
  sellerId: string | null;
1344
- contractType: string;
3318
+ paymentMethodId: string | null;
1345
3319
  contractNumber: string;
1346
3320
  title: string;
1347
3321
  description: string | null;
3322
+ contractType: string;
3323
+ totalAmount: number;
3324
+ downPayment: number;
3325
+ downPaymentPaid: number;
3326
+ principal: number | null;
3327
+ interestRate: number | null;
3328
+ termMonths: number | null;
3329
+ periodicPayment: number | null;
3330
+ totalPaidToDate: number;
3331
+ totalInterestPaid: number;
1348
3332
  status: string;
3333
+ state: string;
3334
+ currentPhaseId: string | null;
3335
+ nextPaymentDueDate: Date | null;
3336
+ lastReminderSentAt: Date | null;
1349
3337
  startDate: Date | null;
1350
3338
  endDate: Date | null;
1351
3339
  signedAt: Date | null;
@@ -1629,11 +3617,16 @@ export interface ContractDelegate<ExtArgs extends runtime.Types.Extensions.Inter
1629
3617
  */
1630
3618
  export interface Prisma__ContractClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
1631
3619
  readonly [Symbol.toStringTag]: "PrismaPromise";
1632
- property<T extends Prisma.PropertyDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.PropertyDefaultArgs<ExtArgs>>): Prisma.Prisma__PropertyClient<runtime.Types.Result.GetResult<Prisma.$PropertyPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>;
1633
- paymentPlan<T extends Prisma.Contract$paymentPlanArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Contract$paymentPlanArgs<ExtArgs>>): Prisma.Prisma__PaymentPlanClient<runtime.Types.Result.GetResult<Prisma.$PaymentPlanPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>;
1634
- buyer<T extends Prisma.Contract$buyerArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Contract$buyerArgs<ExtArgs>>): Prisma.Prisma__UserClient<runtime.Types.Result.GetResult<Prisma.$UserPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>;
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>;
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>;
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>;
1635
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>;
3624
+ paymentMethod<T extends Prisma.Contract$paymentMethodArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Contract$paymentMethodArgs<ExtArgs>>): Prisma.Prisma__PropertyPaymentMethodClient<runtime.Types.Result.GetResult<Prisma.$PropertyPaymentMethodPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>;
3625
+ phases<T extends Prisma.Contract$phasesArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Contract$phasesArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$ContractPhasePayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>;
1636
3626
  documents<T extends Prisma.Contract$documentsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Contract$documentsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$ContractDocumentPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>;
3627
+ payments<T extends Prisma.Contract$paymentsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Contract$paymentsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$ContractPaymentPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>;
3628
+ transitions<T extends Prisma.Contract$transitionsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Contract$transitionsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$ContractTransitionPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>;
3629
+ events<T extends Prisma.Contract$eventsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Contract$eventsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$ContractEventPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>;
1637
3630
  /**
1638
3631
  * Attaches callbacks for the resolution and/or rejection of the Promise.
1639
3632
  * @param onfulfilled The callback to execute when the Promise is resolved.
@@ -1660,15 +3653,29 @@ export interface Prisma__ContractClient<T, Null = never, ExtArgs extends runtime
1660
3653
  */
1661
3654
  export interface ContractFieldRefs {
1662
3655
  readonly id: Prisma.FieldRef<"Contract", 'String'>;
1663
- readonly propertyId: Prisma.FieldRef<"Contract", 'String'>;
1664
- readonly paymentPlanId: Prisma.FieldRef<"Contract", 'String'>;
3656
+ readonly tenantId: Prisma.FieldRef<"Contract", 'String'>;
3657
+ readonly propertyUnitId: Prisma.FieldRef<"Contract", 'String'>;
1665
3658
  readonly buyerId: Prisma.FieldRef<"Contract", 'String'>;
1666
3659
  readonly sellerId: Prisma.FieldRef<"Contract", 'String'>;
1667
- readonly contractType: Prisma.FieldRef<"Contract", 'String'>;
3660
+ readonly paymentMethodId: Prisma.FieldRef<"Contract", 'String'>;
1668
3661
  readonly contractNumber: Prisma.FieldRef<"Contract", 'String'>;
1669
3662
  readonly title: Prisma.FieldRef<"Contract", 'String'>;
1670
3663
  readonly description: Prisma.FieldRef<"Contract", 'String'>;
3664
+ readonly contractType: Prisma.FieldRef<"Contract", 'String'>;
3665
+ readonly totalAmount: Prisma.FieldRef<"Contract", 'Float'>;
3666
+ readonly downPayment: Prisma.FieldRef<"Contract", 'Float'>;
3667
+ readonly downPaymentPaid: Prisma.FieldRef<"Contract", 'Float'>;
3668
+ readonly principal: Prisma.FieldRef<"Contract", 'Float'>;
3669
+ readonly interestRate: Prisma.FieldRef<"Contract", 'Float'>;
3670
+ readonly termMonths: Prisma.FieldRef<"Contract", 'Int'>;
3671
+ readonly periodicPayment: Prisma.FieldRef<"Contract", 'Float'>;
3672
+ readonly totalPaidToDate: Prisma.FieldRef<"Contract", 'Float'>;
3673
+ readonly totalInterestPaid: Prisma.FieldRef<"Contract", 'Float'>;
1671
3674
  readonly status: Prisma.FieldRef<"Contract", 'String'>;
3675
+ readonly state: Prisma.FieldRef<"Contract", 'String'>;
3676
+ readonly currentPhaseId: Prisma.FieldRef<"Contract", 'String'>;
3677
+ readonly nextPaymentDueDate: Prisma.FieldRef<"Contract", 'DateTime'>;
3678
+ readonly lastReminderSentAt: Prisma.FieldRef<"Contract", 'DateTime'>;
1672
3679
  readonly startDate: Prisma.FieldRef<"Contract", 'DateTime'>;
1673
3680
  readonly endDate: Prisma.FieldRef<"Contract", 'DateTime'>;
1674
3681
  readonly signedAt: Prisma.FieldRef<"Contract", 'DateTime'>;
@@ -2003,58 +4010,63 @@ export type ContractDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.Inte
2003
4010
  limit?: number;
2004
4011
  };
2005
4012
  /**
2006
- * Contract.paymentPlan
4013
+ * Contract.seller
2007
4014
  */
2008
- export type Contract$paymentPlanArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
4015
+ export type Contract$sellerArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
2009
4016
  /**
2010
- * Select specific fields to fetch from the PaymentPlan
4017
+ * Select specific fields to fetch from the User
2011
4018
  */
2012
- select?: Prisma.PaymentPlanSelect<ExtArgs> | null;
4019
+ select?: Prisma.UserSelect<ExtArgs> | null;
2013
4020
  /**
2014
- * Omit specific fields from the PaymentPlan
4021
+ * Omit specific fields from the User
2015
4022
  */
2016
- omit?: Prisma.PaymentPlanOmit<ExtArgs> | null;
4023
+ omit?: Prisma.UserOmit<ExtArgs> | null;
2017
4024
  /**
2018
4025
  * Choose, which related nodes to fetch as well
2019
4026
  */
2020
- include?: Prisma.PaymentPlanInclude<ExtArgs> | null;
2021
- where?: Prisma.PaymentPlanWhereInput;
4027
+ include?: Prisma.UserInclude<ExtArgs> | null;
4028
+ where?: Prisma.UserWhereInput;
2022
4029
  };
2023
4030
  /**
2024
- * Contract.buyer
4031
+ * Contract.paymentMethod
2025
4032
  */
2026
- export type Contract$buyerArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
4033
+ export type Contract$paymentMethodArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
2027
4034
  /**
2028
- * Select specific fields to fetch from the User
4035
+ * Select specific fields to fetch from the PropertyPaymentMethod
2029
4036
  */
2030
- select?: Prisma.UserSelect<ExtArgs> | null;
4037
+ select?: Prisma.PropertyPaymentMethodSelect<ExtArgs> | null;
2031
4038
  /**
2032
- * Omit specific fields from the User
4039
+ * Omit specific fields from the PropertyPaymentMethod
2033
4040
  */
2034
- omit?: Prisma.UserOmit<ExtArgs> | null;
4041
+ omit?: Prisma.PropertyPaymentMethodOmit<ExtArgs> | null;
2035
4042
  /**
2036
4043
  * Choose, which related nodes to fetch as well
2037
4044
  */
2038
- include?: Prisma.UserInclude<ExtArgs> | null;
2039
- where?: Prisma.UserWhereInput;
4045
+ include?: Prisma.PropertyPaymentMethodInclude<ExtArgs> | null;
4046
+ where?: Prisma.PropertyPaymentMethodWhereInput;
2040
4047
  };
2041
4048
  /**
2042
- * Contract.seller
4049
+ * Contract.phases
2043
4050
  */
2044
- export type Contract$sellerArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
4051
+ export type Contract$phasesArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
2045
4052
  /**
2046
- * Select specific fields to fetch from the User
4053
+ * Select specific fields to fetch from the ContractPhase
2047
4054
  */
2048
- select?: Prisma.UserSelect<ExtArgs> | null;
4055
+ select?: Prisma.ContractPhaseSelect<ExtArgs> | null;
2049
4056
  /**
2050
- * Omit specific fields from the User
4057
+ * Omit specific fields from the ContractPhase
2051
4058
  */
2052
- omit?: Prisma.UserOmit<ExtArgs> | null;
4059
+ omit?: Prisma.ContractPhaseOmit<ExtArgs> | null;
2053
4060
  /**
2054
4061
  * Choose, which related nodes to fetch as well
2055
4062
  */
2056
- include?: Prisma.UserInclude<ExtArgs> | null;
2057
- where?: Prisma.UserWhereInput;
4063
+ include?: Prisma.ContractPhaseInclude<ExtArgs> | null;
4064
+ where?: Prisma.ContractPhaseWhereInput;
4065
+ orderBy?: Prisma.ContractPhaseOrderByWithRelationInput | Prisma.ContractPhaseOrderByWithRelationInput[];
4066
+ cursor?: Prisma.ContractPhaseWhereUniqueInput;
4067
+ take?: number;
4068
+ skip?: number;
4069
+ distinct?: Prisma.ContractPhaseScalarFieldEnum | Prisma.ContractPhaseScalarFieldEnum[];
2058
4070
  };
2059
4071
  /**
2060
4072
  * Contract.documents
@@ -2079,6 +4091,75 @@ export type Contract$documentsArgs<ExtArgs extends runtime.Types.Extensions.Inte
2079
4091
  skip?: number;
2080
4092
  distinct?: Prisma.ContractDocumentScalarFieldEnum | Prisma.ContractDocumentScalarFieldEnum[];
2081
4093
  };
4094
+ /**
4095
+ * Contract.payments
4096
+ */
4097
+ export type Contract$paymentsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
4098
+ /**
4099
+ * Select specific fields to fetch from the ContractPayment
4100
+ */
4101
+ select?: Prisma.ContractPaymentSelect<ExtArgs> | null;
4102
+ /**
4103
+ * Omit specific fields from the ContractPayment
4104
+ */
4105
+ omit?: Prisma.ContractPaymentOmit<ExtArgs> | null;
4106
+ /**
4107
+ * Choose, which related nodes to fetch as well
4108
+ */
4109
+ include?: Prisma.ContractPaymentInclude<ExtArgs> | null;
4110
+ where?: Prisma.ContractPaymentWhereInput;
4111
+ orderBy?: Prisma.ContractPaymentOrderByWithRelationInput | Prisma.ContractPaymentOrderByWithRelationInput[];
4112
+ cursor?: Prisma.ContractPaymentWhereUniqueInput;
4113
+ take?: number;
4114
+ skip?: number;
4115
+ distinct?: Prisma.ContractPaymentScalarFieldEnum | Prisma.ContractPaymentScalarFieldEnum[];
4116
+ };
4117
+ /**
4118
+ * Contract.transitions
4119
+ */
4120
+ export type Contract$transitionsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
4121
+ /**
4122
+ * Select specific fields to fetch from the ContractTransition
4123
+ */
4124
+ select?: Prisma.ContractTransitionSelect<ExtArgs> | null;
4125
+ /**
4126
+ * Omit specific fields from the ContractTransition
4127
+ */
4128
+ omit?: Prisma.ContractTransitionOmit<ExtArgs> | null;
4129
+ /**
4130
+ * Choose, which related nodes to fetch as well
4131
+ */
4132
+ include?: Prisma.ContractTransitionInclude<ExtArgs> | null;
4133
+ where?: Prisma.ContractTransitionWhereInput;
4134
+ orderBy?: Prisma.ContractTransitionOrderByWithRelationInput | Prisma.ContractTransitionOrderByWithRelationInput[];
4135
+ cursor?: Prisma.ContractTransitionWhereUniqueInput;
4136
+ take?: number;
4137
+ skip?: number;
4138
+ distinct?: Prisma.ContractTransitionScalarFieldEnum | Prisma.ContractTransitionScalarFieldEnum[];
4139
+ };
4140
+ /**
4141
+ * Contract.events
4142
+ */
4143
+ export type Contract$eventsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
4144
+ /**
4145
+ * Select specific fields to fetch from the ContractEvent
4146
+ */
4147
+ select?: Prisma.ContractEventSelect<ExtArgs> | null;
4148
+ /**
4149
+ * Omit specific fields from the ContractEvent
4150
+ */
4151
+ omit?: Prisma.ContractEventOmit<ExtArgs> | null;
4152
+ /**
4153
+ * Choose, which related nodes to fetch as well
4154
+ */
4155
+ include?: Prisma.ContractEventInclude<ExtArgs> | null;
4156
+ where?: Prisma.ContractEventWhereInput;
4157
+ orderBy?: Prisma.ContractEventOrderByWithRelationInput | Prisma.ContractEventOrderByWithRelationInput[];
4158
+ cursor?: Prisma.ContractEventWhereUniqueInput;
4159
+ take?: number;
4160
+ skip?: number;
4161
+ distinct?: Prisma.ContractEventScalarFieldEnum | Prisma.ContractEventScalarFieldEnum[];
4162
+ };
2082
4163
  /**
2083
4164
  * Contract without action
2084
4165
  */