@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
@@ -13,143 +13,107 @@ export type AggregatePaymentPlan = {
13
13
  _max: PaymentPlanMaxAggregateOutputType | null;
14
14
  };
15
15
  export type PaymentPlanAvgAggregateOutputType = {
16
- totalAmount: number | null;
17
- downPaymentAmount: number | null;
18
- downPaymentPaid: number | null;
19
- principalAmount: number | null;
20
- interestRate: number | null;
21
- totalInterest: number | null;
16
+ customFrequencyDays: number | null;
17
+ numberOfInstallments: number | null;
18
+ gracePeriodDays: number | null;
22
19
  };
23
20
  export type PaymentPlanSumAggregateOutputType = {
24
- totalAmount: number | null;
25
- downPaymentAmount: number | null;
26
- downPaymentPaid: number | null;
27
- principalAmount: number | null;
28
- interestRate: number | null;
29
- totalInterest: number | null;
21
+ customFrequencyDays: number | null;
22
+ numberOfInstallments: number | null;
23
+ gracePeriodDays: number | null;
30
24
  };
31
25
  export type PaymentPlanMinAggregateOutputType = {
32
26
  id: string | null;
33
- propertyId: string | null;
34
- buyerId: string | null;
35
- planType: string | null;
27
+ tenantId: string | null;
36
28
  name: string | null;
37
29
  description: string | null;
38
- totalAmount: number | null;
39
- downPaymentAmount: number | null;
40
- downPaymentPaid: number | null;
41
- principalAmount: number | null;
42
- interestRate: number | null;
43
- totalInterest: number | null;
44
- state: string | null;
45
- stateMetadata: string | null;
30
+ isActive: boolean | null;
31
+ paymentFrequency: string | null;
32
+ customFrequencyDays: number | null;
33
+ numberOfInstallments: number | null;
34
+ calculateInterestDaily: boolean | null;
35
+ gracePeriodDays: number | null;
46
36
  createdAt: Date | null;
47
37
  updatedAt: Date | null;
48
38
  };
49
39
  export type PaymentPlanMaxAggregateOutputType = {
50
40
  id: string | null;
51
- propertyId: string | null;
52
- buyerId: string | null;
53
- planType: string | null;
41
+ tenantId: string | null;
54
42
  name: string | null;
55
43
  description: string | null;
56
- totalAmount: number | null;
57
- downPaymentAmount: number | null;
58
- downPaymentPaid: number | null;
59
- principalAmount: number | null;
60
- interestRate: number | null;
61
- totalInterest: number | null;
62
- state: string | null;
63
- stateMetadata: string | null;
44
+ isActive: boolean | null;
45
+ paymentFrequency: string | null;
46
+ customFrequencyDays: number | null;
47
+ numberOfInstallments: number | null;
48
+ calculateInterestDaily: boolean | null;
49
+ gracePeriodDays: number | null;
64
50
  createdAt: Date | null;
65
51
  updatedAt: Date | null;
66
52
  };
67
53
  export type PaymentPlanCountAggregateOutputType = {
68
54
  id: number;
69
- propertyId: number;
70
- buyerId: number;
71
- planType: number;
55
+ tenantId: number;
72
56
  name: number;
73
57
  description: number;
74
- totalAmount: number;
75
- downPaymentAmount: number;
76
- downPaymentPaid: number;
77
- principalAmount: number;
78
- interestRate: number;
79
- totalInterest: number;
80
- state: number;
81
- stateMetadata: number;
58
+ isActive: number;
59
+ paymentFrequency: number;
60
+ customFrequencyDays: number;
61
+ numberOfInstallments: number;
62
+ calculateInterestDaily: number;
63
+ gracePeriodDays: number;
82
64
  createdAt: number;
83
65
  updatedAt: number;
84
66
  _all: number;
85
67
  };
86
68
  export type PaymentPlanAvgAggregateInputType = {
87
- totalAmount?: true;
88
- downPaymentAmount?: true;
89
- downPaymentPaid?: true;
90
- principalAmount?: true;
91
- interestRate?: true;
92
- totalInterest?: true;
69
+ customFrequencyDays?: true;
70
+ numberOfInstallments?: true;
71
+ gracePeriodDays?: true;
93
72
  };
94
73
  export type PaymentPlanSumAggregateInputType = {
95
- totalAmount?: true;
96
- downPaymentAmount?: true;
97
- downPaymentPaid?: true;
98
- principalAmount?: true;
99
- interestRate?: true;
100
- totalInterest?: true;
74
+ customFrequencyDays?: true;
75
+ numberOfInstallments?: true;
76
+ gracePeriodDays?: true;
101
77
  };
102
78
  export type PaymentPlanMinAggregateInputType = {
103
79
  id?: true;
104
- propertyId?: true;
105
- buyerId?: true;
106
- planType?: true;
80
+ tenantId?: true;
107
81
  name?: true;
108
82
  description?: true;
109
- totalAmount?: true;
110
- downPaymentAmount?: true;
111
- downPaymentPaid?: true;
112
- principalAmount?: true;
113
- interestRate?: true;
114
- totalInterest?: true;
115
- state?: true;
116
- stateMetadata?: true;
83
+ isActive?: true;
84
+ paymentFrequency?: true;
85
+ customFrequencyDays?: true;
86
+ numberOfInstallments?: true;
87
+ calculateInterestDaily?: true;
88
+ gracePeriodDays?: true;
117
89
  createdAt?: true;
118
90
  updatedAt?: true;
119
91
  };
120
92
  export type PaymentPlanMaxAggregateInputType = {
121
93
  id?: true;
122
- propertyId?: true;
123
- buyerId?: true;
124
- planType?: true;
94
+ tenantId?: true;
125
95
  name?: true;
126
96
  description?: true;
127
- totalAmount?: true;
128
- downPaymentAmount?: true;
129
- downPaymentPaid?: true;
130
- principalAmount?: true;
131
- interestRate?: true;
132
- totalInterest?: true;
133
- state?: true;
134
- stateMetadata?: true;
97
+ isActive?: true;
98
+ paymentFrequency?: true;
99
+ customFrequencyDays?: true;
100
+ numberOfInstallments?: true;
101
+ calculateInterestDaily?: true;
102
+ gracePeriodDays?: true;
135
103
  createdAt?: true;
136
104
  updatedAt?: true;
137
105
  };
138
106
  export type PaymentPlanCountAggregateInputType = {
139
107
  id?: true;
140
- propertyId?: true;
141
- buyerId?: true;
142
- planType?: true;
108
+ tenantId?: true;
143
109
  name?: true;
144
110
  description?: true;
145
- totalAmount?: true;
146
- downPaymentAmount?: true;
147
- downPaymentPaid?: true;
148
- principalAmount?: true;
149
- interestRate?: true;
150
- totalInterest?: true;
151
- state?: true;
152
- stateMetadata?: true;
111
+ isActive?: true;
112
+ paymentFrequency?: true;
113
+ customFrequencyDays?: true;
114
+ numberOfInstallments?: true;
115
+ calculateInterestDaily?: true;
116
+ gracePeriodDays?: true;
153
117
  createdAt?: true;
154
118
  updatedAt?: true;
155
119
  _all?: true;
@@ -232,19 +196,15 @@ export type PaymentPlanGroupByArgs<ExtArgs extends runtime.Types.Extensions.Inte
232
196
  };
233
197
  export type PaymentPlanGroupByOutputType = {
234
198
  id: string;
235
- propertyId: string;
236
- buyerId: string | null;
237
- planType: string;
199
+ tenantId: string | null;
238
200
  name: string;
239
201
  description: string | null;
240
- totalAmount: number;
241
- downPaymentAmount: number;
242
- downPaymentPaid: number;
243
- principalAmount: number;
244
- interestRate: number;
245
- totalInterest: number;
246
- state: string;
247
- stateMetadata: string | null;
202
+ isActive: boolean;
203
+ paymentFrequency: string;
204
+ customFrequencyDays: number | null;
205
+ numberOfInstallments: number;
206
+ calculateInterestDaily: boolean;
207
+ gracePeriodDays: number;
248
208
  createdAt: Date;
249
209
  updatedAt: Date;
250
210
  _count: PaymentPlanCountAggregateOutputType | null;
@@ -261,92 +221,71 @@ export type PaymentPlanWhereInput = {
261
221
  OR?: Prisma.PaymentPlanWhereInput[];
262
222
  NOT?: Prisma.PaymentPlanWhereInput | Prisma.PaymentPlanWhereInput[];
263
223
  id?: Prisma.StringFilter<"PaymentPlan"> | string;
264
- propertyId?: Prisma.StringFilter<"PaymentPlan"> | string;
265
- buyerId?: Prisma.StringNullableFilter<"PaymentPlan"> | string | null;
266
- planType?: Prisma.StringFilter<"PaymentPlan"> | string;
224
+ tenantId?: Prisma.StringNullableFilter<"PaymentPlan"> | string | null;
267
225
  name?: Prisma.StringFilter<"PaymentPlan"> | string;
268
226
  description?: Prisma.StringNullableFilter<"PaymentPlan"> | string | null;
269
- totalAmount?: Prisma.FloatFilter<"PaymentPlan"> | number;
270
- downPaymentAmount?: Prisma.FloatFilter<"PaymentPlan"> | number;
271
- downPaymentPaid?: Prisma.FloatFilter<"PaymentPlan"> | number;
272
- principalAmount?: Prisma.FloatFilter<"PaymentPlan"> | number;
273
- interestRate?: Prisma.FloatFilter<"PaymentPlan"> | number;
274
- totalInterest?: Prisma.FloatFilter<"PaymentPlan"> | number;
275
- state?: Prisma.StringFilter<"PaymentPlan"> | string;
276
- stateMetadata?: Prisma.StringNullableFilter<"PaymentPlan"> | string | null;
227
+ isActive?: Prisma.BoolFilter<"PaymentPlan"> | boolean;
228
+ paymentFrequency?: Prisma.StringFilter<"PaymentPlan"> | string;
229
+ customFrequencyDays?: Prisma.IntNullableFilter<"PaymentPlan"> | number | null;
230
+ numberOfInstallments?: Prisma.IntFilter<"PaymentPlan"> | number;
231
+ calculateInterestDaily?: Prisma.BoolFilter<"PaymentPlan"> | boolean;
232
+ gracePeriodDays?: Prisma.IntFilter<"PaymentPlan"> | number;
277
233
  createdAt?: Prisma.DateTimeFilter<"PaymentPlan"> | Date | string;
278
234
  updatedAt?: Prisma.DateTimeFilter<"PaymentPlan"> | Date | string;
279
- property?: Prisma.XOR<Prisma.PropertyScalarRelationFilter, Prisma.PropertyWhereInput>;
280
- buyer?: Prisma.XOR<Prisma.UserNullableScalarRelationFilter, Prisma.UserWhereInput> | null;
281
- contract?: Prisma.XOR<Prisma.ContractNullableScalarRelationFilter, Prisma.ContractWhereInput> | null;
282
- schedules?: Prisma.PaymentScheduleListRelationFilter;
283
- payments?: Prisma.PaymentListRelationFilter;
235
+ tenant?: Prisma.XOR<Prisma.TenantNullableScalarRelationFilter, Prisma.TenantWhereInput> | null;
236
+ methodPhases?: Prisma.PropertyPaymentMethodPhaseListRelationFilter;
237
+ contractPhases?: Prisma.ContractPhaseListRelationFilter;
284
238
  };
285
239
  export type PaymentPlanOrderByWithRelationInput = {
286
240
  id?: Prisma.SortOrder;
287
- propertyId?: Prisma.SortOrder;
288
- buyerId?: Prisma.SortOrderInput | Prisma.SortOrder;
289
- planType?: Prisma.SortOrder;
241
+ tenantId?: Prisma.SortOrderInput | Prisma.SortOrder;
290
242
  name?: Prisma.SortOrder;
291
243
  description?: Prisma.SortOrderInput | Prisma.SortOrder;
292
- totalAmount?: Prisma.SortOrder;
293
- downPaymentAmount?: Prisma.SortOrder;
294
- downPaymentPaid?: Prisma.SortOrder;
295
- principalAmount?: Prisma.SortOrder;
296
- interestRate?: Prisma.SortOrder;
297
- totalInterest?: Prisma.SortOrder;
298
- state?: Prisma.SortOrder;
299
- stateMetadata?: Prisma.SortOrderInput | Prisma.SortOrder;
244
+ isActive?: Prisma.SortOrder;
245
+ paymentFrequency?: Prisma.SortOrder;
246
+ customFrequencyDays?: Prisma.SortOrderInput | Prisma.SortOrder;
247
+ numberOfInstallments?: Prisma.SortOrder;
248
+ calculateInterestDaily?: Prisma.SortOrder;
249
+ gracePeriodDays?: Prisma.SortOrder;
300
250
  createdAt?: Prisma.SortOrder;
301
251
  updatedAt?: Prisma.SortOrder;
302
- property?: Prisma.PropertyOrderByWithRelationInput;
303
- buyer?: Prisma.UserOrderByWithRelationInput;
304
- contract?: Prisma.ContractOrderByWithRelationInput;
305
- schedules?: Prisma.PaymentScheduleOrderByRelationAggregateInput;
306
- payments?: Prisma.PaymentOrderByRelationAggregateInput;
252
+ tenant?: Prisma.TenantOrderByWithRelationInput;
253
+ methodPhases?: Prisma.PropertyPaymentMethodPhaseOrderByRelationAggregateInput;
254
+ contractPhases?: Prisma.ContractPhaseOrderByRelationAggregateInput;
307
255
  _relevance?: Prisma.PaymentPlanOrderByRelevanceInput;
308
256
  };
309
257
  export type PaymentPlanWhereUniqueInput = Prisma.AtLeast<{
310
258
  id?: string;
259
+ tenantId_name?: Prisma.PaymentPlanTenantIdNameCompoundUniqueInput;
311
260
  AND?: Prisma.PaymentPlanWhereInput | Prisma.PaymentPlanWhereInput[];
312
261
  OR?: Prisma.PaymentPlanWhereInput[];
313
262
  NOT?: Prisma.PaymentPlanWhereInput | Prisma.PaymentPlanWhereInput[];
314
- propertyId?: Prisma.StringFilter<"PaymentPlan"> | string;
315
- buyerId?: Prisma.StringNullableFilter<"PaymentPlan"> | string | null;
316
- planType?: Prisma.StringFilter<"PaymentPlan"> | string;
263
+ tenantId?: Prisma.StringNullableFilter<"PaymentPlan"> | string | null;
317
264
  name?: Prisma.StringFilter<"PaymentPlan"> | string;
318
265
  description?: Prisma.StringNullableFilter<"PaymentPlan"> | string | null;
319
- totalAmount?: Prisma.FloatFilter<"PaymentPlan"> | number;
320
- downPaymentAmount?: Prisma.FloatFilter<"PaymentPlan"> | number;
321
- downPaymentPaid?: Prisma.FloatFilter<"PaymentPlan"> | number;
322
- principalAmount?: Prisma.FloatFilter<"PaymentPlan"> | number;
323
- interestRate?: Prisma.FloatFilter<"PaymentPlan"> | number;
324
- totalInterest?: Prisma.FloatFilter<"PaymentPlan"> | number;
325
- state?: Prisma.StringFilter<"PaymentPlan"> | string;
326
- stateMetadata?: Prisma.StringNullableFilter<"PaymentPlan"> | string | null;
266
+ isActive?: Prisma.BoolFilter<"PaymentPlan"> | boolean;
267
+ paymentFrequency?: Prisma.StringFilter<"PaymentPlan"> | string;
268
+ customFrequencyDays?: Prisma.IntNullableFilter<"PaymentPlan"> | number | null;
269
+ numberOfInstallments?: Prisma.IntFilter<"PaymentPlan"> | number;
270
+ calculateInterestDaily?: Prisma.BoolFilter<"PaymentPlan"> | boolean;
271
+ gracePeriodDays?: Prisma.IntFilter<"PaymentPlan"> | number;
327
272
  createdAt?: Prisma.DateTimeFilter<"PaymentPlan"> | Date | string;
328
273
  updatedAt?: Prisma.DateTimeFilter<"PaymentPlan"> | Date | string;
329
- property?: Prisma.XOR<Prisma.PropertyScalarRelationFilter, Prisma.PropertyWhereInput>;
330
- buyer?: Prisma.XOR<Prisma.UserNullableScalarRelationFilter, Prisma.UserWhereInput> | null;
331
- contract?: Prisma.XOR<Prisma.ContractNullableScalarRelationFilter, Prisma.ContractWhereInput> | null;
332
- schedules?: Prisma.PaymentScheduleListRelationFilter;
333
- payments?: Prisma.PaymentListRelationFilter;
334
- }, "id">;
274
+ tenant?: Prisma.XOR<Prisma.TenantNullableScalarRelationFilter, Prisma.TenantWhereInput> | null;
275
+ methodPhases?: Prisma.PropertyPaymentMethodPhaseListRelationFilter;
276
+ contractPhases?: Prisma.ContractPhaseListRelationFilter;
277
+ }, "id" | "tenantId_name">;
335
278
  export type PaymentPlanOrderByWithAggregationInput = {
336
279
  id?: Prisma.SortOrder;
337
- propertyId?: Prisma.SortOrder;
338
- buyerId?: Prisma.SortOrderInput | Prisma.SortOrder;
339
- planType?: Prisma.SortOrder;
280
+ tenantId?: Prisma.SortOrderInput | Prisma.SortOrder;
340
281
  name?: Prisma.SortOrder;
341
282
  description?: Prisma.SortOrderInput | Prisma.SortOrder;
342
- totalAmount?: Prisma.SortOrder;
343
- downPaymentAmount?: Prisma.SortOrder;
344
- downPaymentPaid?: Prisma.SortOrder;
345
- principalAmount?: Prisma.SortOrder;
346
- interestRate?: Prisma.SortOrder;
347
- totalInterest?: Prisma.SortOrder;
348
- state?: Prisma.SortOrder;
349
- stateMetadata?: Prisma.SortOrderInput | Prisma.SortOrder;
283
+ isActive?: Prisma.SortOrder;
284
+ paymentFrequency?: Prisma.SortOrder;
285
+ customFrequencyDays?: Prisma.SortOrderInput | Prisma.SortOrder;
286
+ numberOfInstallments?: Prisma.SortOrder;
287
+ calculateInterestDaily?: Prisma.SortOrder;
288
+ gracePeriodDays?: Prisma.SortOrder;
350
289
  createdAt?: Prisma.SortOrder;
351
290
  updatedAt?: Prisma.SortOrder;
352
291
  _count?: Prisma.PaymentPlanCountOrderByAggregateInput;
@@ -360,155 +299,120 @@ export type PaymentPlanScalarWhereWithAggregatesInput = {
360
299
  OR?: Prisma.PaymentPlanScalarWhereWithAggregatesInput[];
361
300
  NOT?: Prisma.PaymentPlanScalarWhereWithAggregatesInput | Prisma.PaymentPlanScalarWhereWithAggregatesInput[];
362
301
  id?: Prisma.StringWithAggregatesFilter<"PaymentPlan"> | string;
363
- propertyId?: Prisma.StringWithAggregatesFilter<"PaymentPlan"> | string;
364
- buyerId?: Prisma.StringNullableWithAggregatesFilter<"PaymentPlan"> | string | null;
365
- planType?: Prisma.StringWithAggregatesFilter<"PaymentPlan"> | string;
302
+ tenantId?: Prisma.StringNullableWithAggregatesFilter<"PaymentPlan"> | string | null;
366
303
  name?: Prisma.StringWithAggregatesFilter<"PaymentPlan"> | string;
367
304
  description?: Prisma.StringNullableWithAggregatesFilter<"PaymentPlan"> | string | null;
368
- totalAmount?: Prisma.FloatWithAggregatesFilter<"PaymentPlan"> | number;
369
- downPaymentAmount?: Prisma.FloatWithAggregatesFilter<"PaymentPlan"> | number;
370
- downPaymentPaid?: Prisma.FloatWithAggregatesFilter<"PaymentPlan"> | number;
371
- principalAmount?: Prisma.FloatWithAggregatesFilter<"PaymentPlan"> | number;
372
- interestRate?: Prisma.FloatWithAggregatesFilter<"PaymentPlan"> | number;
373
- totalInterest?: Prisma.FloatWithAggregatesFilter<"PaymentPlan"> | number;
374
- state?: Prisma.StringWithAggregatesFilter<"PaymentPlan"> | string;
375
- stateMetadata?: Prisma.StringNullableWithAggregatesFilter<"PaymentPlan"> | string | null;
305
+ isActive?: Prisma.BoolWithAggregatesFilter<"PaymentPlan"> | boolean;
306
+ paymentFrequency?: Prisma.StringWithAggregatesFilter<"PaymentPlan"> | string;
307
+ customFrequencyDays?: Prisma.IntNullableWithAggregatesFilter<"PaymentPlan"> | number | null;
308
+ numberOfInstallments?: Prisma.IntWithAggregatesFilter<"PaymentPlan"> | number;
309
+ calculateInterestDaily?: Prisma.BoolWithAggregatesFilter<"PaymentPlan"> | boolean;
310
+ gracePeriodDays?: Prisma.IntWithAggregatesFilter<"PaymentPlan"> | number;
376
311
  createdAt?: Prisma.DateTimeWithAggregatesFilter<"PaymentPlan"> | Date | string;
377
312
  updatedAt?: Prisma.DateTimeWithAggregatesFilter<"PaymentPlan"> | Date | string;
378
313
  };
379
314
  export type PaymentPlanCreateInput = {
380
315
  id?: string;
381
- planType: string;
382
316
  name: string;
383
317
  description?: string | null;
384
- totalAmount: number;
385
- downPaymentAmount?: number;
386
- downPaymentPaid?: number;
387
- principalAmount: number;
388
- interestRate?: number;
389
- totalInterest?: number;
390
- state?: string;
391
- stateMetadata?: string | null;
318
+ isActive?: boolean;
319
+ paymentFrequency: string;
320
+ customFrequencyDays?: number | null;
321
+ numberOfInstallments: number;
322
+ calculateInterestDaily?: boolean;
323
+ gracePeriodDays?: number;
392
324
  createdAt?: Date | string;
393
325
  updatedAt?: Date | string;
394
- property: Prisma.PropertyCreateNestedOneWithoutPaymentPlansInput;
395
- buyer?: Prisma.UserCreateNestedOneWithoutPaymentPlansInput;
396
- contract?: Prisma.ContractCreateNestedOneWithoutPaymentPlanInput;
397
- schedules?: Prisma.PaymentScheduleCreateNestedManyWithoutPlanInput;
398
- payments?: Prisma.PaymentCreateNestedManyWithoutPlanInput;
326
+ tenant?: Prisma.TenantCreateNestedOneWithoutPaymentPlansInput;
327
+ methodPhases?: Prisma.PropertyPaymentMethodPhaseCreateNestedManyWithoutPaymentPlanInput;
328
+ contractPhases?: Prisma.ContractPhaseCreateNestedManyWithoutPaymentPlanInput;
399
329
  };
400
330
  export type PaymentPlanUncheckedCreateInput = {
401
331
  id?: string;
402
- propertyId: string;
403
- buyerId?: string | null;
404
- planType: string;
332
+ tenantId?: string | null;
405
333
  name: string;
406
334
  description?: string | null;
407
- totalAmount: number;
408
- downPaymentAmount?: number;
409
- downPaymentPaid?: number;
410
- principalAmount: number;
411
- interestRate?: number;
412
- totalInterest?: number;
413
- state?: string;
414
- stateMetadata?: string | null;
335
+ isActive?: boolean;
336
+ paymentFrequency: string;
337
+ customFrequencyDays?: number | null;
338
+ numberOfInstallments: number;
339
+ calculateInterestDaily?: boolean;
340
+ gracePeriodDays?: number;
415
341
  createdAt?: Date | string;
416
342
  updatedAt?: Date | string;
417
- contract?: Prisma.ContractUncheckedCreateNestedOneWithoutPaymentPlanInput;
418
- schedules?: Prisma.PaymentScheduleUncheckedCreateNestedManyWithoutPlanInput;
419
- payments?: Prisma.PaymentUncheckedCreateNestedManyWithoutPlanInput;
343
+ methodPhases?: Prisma.PropertyPaymentMethodPhaseUncheckedCreateNestedManyWithoutPaymentPlanInput;
344
+ contractPhases?: Prisma.ContractPhaseUncheckedCreateNestedManyWithoutPaymentPlanInput;
420
345
  };
421
346
  export type PaymentPlanUpdateInput = {
422
347
  id?: Prisma.StringFieldUpdateOperationsInput | string;
423
- planType?: Prisma.StringFieldUpdateOperationsInput | string;
424
348
  name?: Prisma.StringFieldUpdateOperationsInput | string;
425
349
  description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
426
- totalAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
427
- downPaymentAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
428
- downPaymentPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
429
- principalAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
430
- interestRate?: Prisma.FloatFieldUpdateOperationsInput | number;
431
- totalInterest?: Prisma.FloatFieldUpdateOperationsInput | number;
432
- state?: Prisma.StringFieldUpdateOperationsInput | string;
433
- stateMetadata?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
350
+ isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean;
351
+ paymentFrequency?: Prisma.StringFieldUpdateOperationsInput | string;
352
+ customFrequencyDays?: Prisma.NullableIntFieldUpdateOperationsInput | number | null;
353
+ numberOfInstallments?: Prisma.IntFieldUpdateOperationsInput | number;
354
+ calculateInterestDaily?: Prisma.BoolFieldUpdateOperationsInput | boolean;
355
+ gracePeriodDays?: Prisma.IntFieldUpdateOperationsInput | number;
434
356
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
435
357
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
436
- property?: Prisma.PropertyUpdateOneRequiredWithoutPaymentPlansNestedInput;
437
- buyer?: Prisma.UserUpdateOneWithoutPaymentPlansNestedInput;
438
- contract?: Prisma.ContractUpdateOneWithoutPaymentPlanNestedInput;
439
- schedules?: Prisma.PaymentScheduleUpdateManyWithoutPlanNestedInput;
440
- payments?: Prisma.PaymentUpdateManyWithoutPlanNestedInput;
358
+ tenant?: Prisma.TenantUpdateOneWithoutPaymentPlansNestedInput;
359
+ methodPhases?: Prisma.PropertyPaymentMethodPhaseUpdateManyWithoutPaymentPlanNestedInput;
360
+ contractPhases?: Prisma.ContractPhaseUpdateManyWithoutPaymentPlanNestedInput;
441
361
  };
442
362
  export type PaymentPlanUncheckedUpdateInput = {
443
363
  id?: Prisma.StringFieldUpdateOperationsInput | string;
444
- propertyId?: Prisma.StringFieldUpdateOperationsInput | string;
445
- buyerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
446
- planType?: Prisma.StringFieldUpdateOperationsInput | string;
364
+ tenantId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
447
365
  name?: Prisma.StringFieldUpdateOperationsInput | string;
448
366
  description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
449
- totalAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
450
- downPaymentAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
451
- downPaymentPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
452
- principalAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
453
- interestRate?: Prisma.FloatFieldUpdateOperationsInput | number;
454
- totalInterest?: Prisma.FloatFieldUpdateOperationsInput | number;
455
- state?: Prisma.StringFieldUpdateOperationsInput | string;
456
- stateMetadata?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
367
+ isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean;
368
+ paymentFrequency?: Prisma.StringFieldUpdateOperationsInput | string;
369
+ customFrequencyDays?: Prisma.NullableIntFieldUpdateOperationsInput | number | null;
370
+ numberOfInstallments?: Prisma.IntFieldUpdateOperationsInput | number;
371
+ calculateInterestDaily?: Prisma.BoolFieldUpdateOperationsInput | boolean;
372
+ gracePeriodDays?: Prisma.IntFieldUpdateOperationsInput | number;
457
373
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
458
374
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
459
- contract?: Prisma.ContractUncheckedUpdateOneWithoutPaymentPlanNestedInput;
460
- schedules?: Prisma.PaymentScheduleUncheckedUpdateManyWithoutPlanNestedInput;
461
- payments?: Prisma.PaymentUncheckedUpdateManyWithoutPlanNestedInput;
375
+ methodPhases?: Prisma.PropertyPaymentMethodPhaseUncheckedUpdateManyWithoutPaymentPlanNestedInput;
376
+ contractPhases?: Prisma.ContractPhaseUncheckedUpdateManyWithoutPaymentPlanNestedInput;
462
377
  };
463
378
  export type PaymentPlanCreateManyInput = {
464
379
  id?: string;
465
- propertyId: string;
466
- buyerId?: string | null;
467
- planType: string;
380
+ tenantId?: string | null;
468
381
  name: string;
469
382
  description?: string | null;
470
- totalAmount: number;
471
- downPaymentAmount?: number;
472
- downPaymentPaid?: number;
473
- principalAmount: number;
474
- interestRate?: number;
475
- totalInterest?: number;
476
- state?: string;
477
- stateMetadata?: string | null;
383
+ isActive?: boolean;
384
+ paymentFrequency: string;
385
+ customFrequencyDays?: number | null;
386
+ numberOfInstallments: number;
387
+ calculateInterestDaily?: boolean;
388
+ gracePeriodDays?: number;
478
389
  createdAt?: Date | string;
479
390
  updatedAt?: Date | string;
480
391
  };
481
392
  export type PaymentPlanUpdateManyMutationInput = {
482
393
  id?: Prisma.StringFieldUpdateOperationsInput | string;
483
- planType?: Prisma.StringFieldUpdateOperationsInput | string;
484
394
  name?: Prisma.StringFieldUpdateOperationsInput | string;
485
395
  description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
486
- totalAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
487
- downPaymentAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
488
- downPaymentPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
489
- principalAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
490
- interestRate?: Prisma.FloatFieldUpdateOperationsInput | number;
491
- totalInterest?: Prisma.FloatFieldUpdateOperationsInput | number;
492
- state?: Prisma.StringFieldUpdateOperationsInput | string;
493
- stateMetadata?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
396
+ isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean;
397
+ paymentFrequency?: Prisma.StringFieldUpdateOperationsInput | string;
398
+ customFrequencyDays?: Prisma.NullableIntFieldUpdateOperationsInput | number | null;
399
+ numberOfInstallments?: Prisma.IntFieldUpdateOperationsInput | number;
400
+ calculateInterestDaily?: Prisma.BoolFieldUpdateOperationsInput | boolean;
401
+ gracePeriodDays?: Prisma.IntFieldUpdateOperationsInput | number;
494
402
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
495
403
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
496
404
  };
497
405
  export type PaymentPlanUncheckedUpdateManyInput = {
498
406
  id?: Prisma.StringFieldUpdateOperationsInput | string;
499
- propertyId?: Prisma.StringFieldUpdateOperationsInput | string;
500
- buyerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
501
- planType?: Prisma.StringFieldUpdateOperationsInput | string;
407
+ tenantId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
502
408
  name?: Prisma.StringFieldUpdateOperationsInput | string;
503
409
  description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
504
- totalAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
505
- downPaymentAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
506
- downPaymentPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
507
- principalAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
508
- interestRate?: Prisma.FloatFieldUpdateOperationsInput | number;
509
- totalInterest?: Prisma.FloatFieldUpdateOperationsInput | number;
510
- state?: Prisma.StringFieldUpdateOperationsInput | string;
511
- stateMetadata?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
410
+ isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean;
411
+ paymentFrequency?: Prisma.StringFieldUpdateOperationsInput | string;
412
+ customFrequencyDays?: Prisma.NullableIntFieldUpdateOperationsInput | number | null;
413
+ numberOfInstallments?: Prisma.IntFieldUpdateOperationsInput | number;
414
+ calculateInterestDaily?: Prisma.BoolFieldUpdateOperationsInput | boolean;
415
+ gracePeriodDays?: Prisma.IntFieldUpdateOperationsInput | number;
512
416
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
513
417
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
514
418
  };
@@ -525,765 +429,399 @@ export type PaymentPlanOrderByRelevanceInput = {
525
429
  sort: Prisma.SortOrder;
526
430
  search: string;
527
431
  };
432
+ export type PaymentPlanTenantIdNameCompoundUniqueInput = {
433
+ tenantId: string;
434
+ name: string;
435
+ };
528
436
  export type PaymentPlanCountOrderByAggregateInput = {
529
437
  id?: Prisma.SortOrder;
530
- propertyId?: Prisma.SortOrder;
531
- buyerId?: Prisma.SortOrder;
532
- planType?: Prisma.SortOrder;
438
+ tenantId?: Prisma.SortOrder;
533
439
  name?: Prisma.SortOrder;
534
440
  description?: Prisma.SortOrder;
535
- totalAmount?: Prisma.SortOrder;
536
- downPaymentAmount?: Prisma.SortOrder;
537
- downPaymentPaid?: Prisma.SortOrder;
538
- principalAmount?: Prisma.SortOrder;
539
- interestRate?: Prisma.SortOrder;
540
- totalInterest?: Prisma.SortOrder;
541
- state?: Prisma.SortOrder;
542
- stateMetadata?: Prisma.SortOrder;
441
+ isActive?: Prisma.SortOrder;
442
+ paymentFrequency?: Prisma.SortOrder;
443
+ customFrequencyDays?: Prisma.SortOrder;
444
+ numberOfInstallments?: Prisma.SortOrder;
445
+ calculateInterestDaily?: Prisma.SortOrder;
446
+ gracePeriodDays?: Prisma.SortOrder;
543
447
  createdAt?: Prisma.SortOrder;
544
448
  updatedAt?: Prisma.SortOrder;
545
449
  };
546
450
  export type PaymentPlanAvgOrderByAggregateInput = {
547
- totalAmount?: Prisma.SortOrder;
548
- downPaymentAmount?: Prisma.SortOrder;
549
- downPaymentPaid?: Prisma.SortOrder;
550
- principalAmount?: Prisma.SortOrder;
551
- interestRate?: Prisma.SortOrder;
552
- totalInterest?: Prisma.SortOrder;
451
+ customFrequencyDays?: Prisma.SortOrder;
452
+ numberOfInstallments?: Prisma.SortOrder;
453
+ gracePeriodDays?: Prisma.SortOrder;
553
454
  };
554
455
  export type PaymentPlanMaxOrderByAggregateInput = {
555
456
  id?: Prisma.SortOrder;
556
- propertyId?: Prisma.SortOrder;
557
- buyerId?: Prisma.SortOrder;
558
- planType?: Prisma.SortOrder;
457
+ tenantId?: Prisma.SortOrder;
559
458
  name?: Prisma.SortOrder;
560
459
  description?: Prisma.SortOrder;
561
- totalAmount?: Prisma.SortOrder;
562
- downPaymentAmount?: Prisma.SortOrder;
563
- downPaymentPaid?: Prisma.SortOrder;
564
- principalAmount?: Prisma.SortOrder;
565
- interestRate?: Prisma.SortOrder;
566
- totalInterest?: Prisma.SortOrder;
567
- state?: Prisma.SortOrder;
568
- stateMetadata?: Prisma.SortOrder;
460
+ isActive?: Prisma.SortOrder;
461
+ paymentFrequency?: Prisma.SortOrder;
462
+ customFrequencyDays?: Prisma.SortOrder;
463
+ numberOfInstallments?: Prisma.SortOrder;
464
+ calculateInterestDaily?: Prisma.SortOrder;
465
+ gracePeriodDays?: Prisma.SortOrder;
569
466
  createdAt?: Prisma.SortOrder;
570
467
  updatedAt?: Prisma.SortOrder;
571
468
  };
572
469
  export type PaymentPlanMinOrderByAggregateInput = {
573
470
  id?: Prisma.SortOrder;
574
- propertyId?: Prisma.SortOrder;
575
- buyerId?: Prisma.SortOrder;
576
- planType?: Prisma.SortOrder;
471
+ tenantId?: Prisma.SortOrder;
577
472
  name?: Prisma.SortOrder;
578
473
  description?: Prisma.SortOrder;
579
- totalAmount?: Prisma.SortOrder;
580
- downPaymentAmount?: Prisma.SortOrder;
581
- downPaymentPaid?: Prisma.SortOrder;
582
- principalAmount?: Prisma.SortOrder;
583
- interestRate?: Prisma.SortOrder;
584
- totalInterest?: Prisma.SortOrder;
585
- state?: Prisma.SortOrder;
586
- stateMetadata?: Prisma.SortOrder;
474
+ isActive?: Prisma.SortOrder;
475
+ paymentFrequency?: Prisma.SortOrder;
476
+ customFrequencyDays?: Prisma.SortOrder;
477
+ numberOfInstallments?: Prisma.SortOrder;
478
+ calculateInterestDaily?: Prisma.SortOrder;
479
+ gracePeriodDays?: Prisma.SortOrder;
587
480
  createdAt?: Prisma.SortOrder;
588
481
  updatedAt?: Prisma.SortOrder;
589
482
  };
590
483
  export type PaymentPlanSumOrderByAggregateInput = {
591
- totalAmount?: Prisma.SortOrder;
592
- downPaymentAmount?: Prisma.SortOrder;
593
- downPaymentPaid?: Prisma.SortOrder;
594
- principalAmount?: Prisma.SortOrder;
595
- interestRate?: Prisma.SortOrder;
596
- totalInterest?: Prisma.SortOrder;
597
- };
598
- export type PaymentPlanScalarRelationFilter = {
599
- is?: Prisma.PaymentPlanWhereInput;
600
- isNot?: Prisma.PaymentPlanWhereInput;
484
+ customFrequencyDays?: Prisma.SortOrder;
485
+ numberOfInstallments?: Prisma.SortOrder;
486
+ gracePeriodDays?: Prisma.SortOrder;
601
487
  };
602
488
  export type PaymentPlanNullableScalarRelationFilter = {
603
489
  is?: Prisma.PaymentPlanWhereInput | null;
604
490
  isNot?: Prisma.PaymentPlanWhereInput | null;
605
491
  };
606
- export type PaymentPlanCreateNestedManyWithoutBuyerInput = {
607
- create?: Prisma.XOR<Prisma.PaymentPlanCreateWithoutBuyerInput, Prisma.PaymentPlanUncheckedCreateWithoutBuyerInput> | Prisma.PaymentPlanCreateWithoutBuyerInput[] | Prisma.PaymentPlanUncheckedCreateWithoutBuyerInput[];
608
- connectOrCreate?: Prisma.PaymentPlanCreateOrConnectWithoutBuyerInput | Prisma.PaymentPlanCreateOrConnectWithoutBuyerInput[];
609
- createMany?: Prisma.PaymentPlanCreateManyBuyerInputEnvelope;
610
- connect?: Prisma.PaymentPlanWhereUniqueInput | Prisma.PaymentPlanWhereUniqueInput[];
611
- };
612
- export type PaymentPlanUncheckedCreateNestedManyWithoutBuyerInput = {
613
- create?: Prisma.XOR<Prisma.PaymentPlanCreateWithoutBuyerInput, Prisma.PaymentPlanUncheckedCreateWithoutBuyerInput> | Prisma.PaymentPlanCreateWithoutBuyerInput[] | Prisma.PaymentPlanUncheckedCreateWithoutBuyerInput[];
614
- connectOrCreate?: Prisma.PaymentPlanCreateOrConnectWithoutBuyerInput | Prisma.PaymentPlanCreateOrConnectWithoutBuyerInput[];
615
- createMany?: Prisma.PaymentPlanCreateManyBuyerInputEnvelope;
616
- connect?: Prisma.PaymentPlanWhereUniqueInput | Prisma.PaymentPlanWhereUniqueInput[];
617
- };
618
- export type PaymentPlanUpdateManyWithoutBuyerNestedInput = {
619
- create?: Prisma.XOR<Prisma.PaymentPlanCreateWithoutBuyerInput, Prisma.PaymentPlanUncheckedCreateWithoutBuyerInput> | Prisma.PaymentPlanCreateWithoutBuyerInput[] | Prisma.PaymentPlanUncheckedCreateWithoutBuyerInput[];
620
- connectOrCreate?: Prisma.PaymentPlanCreateOrConnectWithoutBuyerInput | Prisma.PaymentPlanCreateOrConnectWithoutBuyerInput[];
621
- upsert?: Prisma.PaymentPlanUpsertWithWhereUniqueWithoutBuyerInput | Prisma.PaymentPlanUpsertWithWhereUniqueWithoutBuyerInput[];
622
- createMany?: Prisma.PaymentPlanCreateManyBuyerInputEnvelope;
623
- set?: Prisma.PaymentPlanWhereUniqueInput | Prisma.PaymentPlanWhereUniqueInput[];
624
- disconnect?: Prisma.PaymentPlanWhereUniqueInput | Prisma.PaymentPlanWhereUniqueInput[];
625
- delete?: Prisma.PaymentPlanWhereUniqueInput | Prisma.PaymentPlanWhereUniqueInput[];
626
- connect?: Prisma.PaymentPlanWhereUniqueInput | Prisma.PaymentPlanWhereUniqueInput[];
627
- update?: Prisma.PaymentPlanUpdateWithWhereUniqueWithoutBuyerInput | Prisma.PaymentPlanUpdateWithWhereUniqueWithoutBuyerInput[];
628
- updateMany?: Prisma.PaymentPlanUpdateManyWithWhereWithoutBuyerInput | Prisma.PaymentPlanUpdateManyWithWhereWithoutBuyerInput[];
629
- deleteMany?: Prisma.PaymentPlanScalarWhereInput | Prisma.PaymentPlanScalarWhereInput[];
630
- };
631
- export type PaymentPlanUncheckedUpdateManyWithoutBuyerNestedInput = {
632
- create?: Prisma.XOR<Prisma.PaymentPlanCreateWithoutBuyerInput, Prisma.PaymentPlanUncheckedCreateWithoutBuyerInput> | Prisma.PaymentPlanCreateWithoutBuyerInput[] | Prisma.PaymentPlanUncheckedCreateWithoutBuyerInput[];
633
- connectOrCreate?: Prisma.PaymentPlanCreateOrConnectWithoutBuyerInput | Prisma.PaymentPlanCreateOrConnectWithoutBuyerInput[];
634
- upsert?: Prisma.PaymentPlanUpsertWithWhereUniqueWithoutBuyerInput | Prisma.PaymentPlanUpsertWithWhereUniqueWithoutBuyerInput[];
635
- createMany?: Prisma.PaymentPlanCreateManyBuyerInputEnvelope;
636
- set?: Prisma.PaymentPlanWhereUniqueInput | Prisma.PaymentPlanWhereUniqueInput[];
637
- disconnect?: Prisma.PaymentPlanWhereUniqueInput | Prisma.PaymentPlanWhereUniqueInput[];
638
- delete?: Prisma.PaymentPlanWhereUniqueInput | Prisma.PaymentPlanWhereUniqueInput[];
639
- connect?: Prisma.PaymentPlanWhereUniqueInput | Prisma.PaymentPlanWhereUniqueInput[];
640
- update?: Prisma.PaymentPlanUpdateWithWhereUniqueWithoutBuyerInput | Prisma.PaymentPlanUpdateWithWhereUniqueWithoutBuyerInput[];
641
- updateMany?: Prisma.PaymentPlanUpdateManyWithWhereWithoutBuyerInput | Prisma.PaymentPlanUpdateManyWithWhereWithoutBuyerInput[];
642
- deleteMany?: Prisma.PaymentPlanScalarWhereInput | Prisma.PaymentPlanScalarWhereInput[];
643
- };
644
- export type PaymentPlanCreateNestedManyWithoutPropertyInput = {
645
- create?: Prisma.XOR<Prisma.PaymentPlanCreateWithoutPropertyInput, Prisma.PaymentPlanUncheckedCreateWithoutPropertyInput> | Prisma.PaymentPlanCreateWithoutPropertyInput[] | Prisma.PaymentPlanUncheckedCreateWithoutPropertyInput[];
646
- connectOrCreate?: Prisma.PaymentPlanCreateOrConnectWithoutPropertyInput | Prisma.PaymentPlanCreateOrConnectWithoutPropertyInput[];
647
- createMany?: Prisma.PaymentPlanCreateManyPropertyInputEnvelope;
492
+ export type PaymentPlanCreateNestedManyWithoutTenantInput = {
493
+ create?: Prisma.XOR<Prisma.PaymentPlanCreateWithoutTenantInput, Prisma.PaymentPlanUncheckedCreateWithoutTenantInput> | Prisma.PaymentPlanCreateWithoutTenantInput[] | Prisma.PaymentPlanUncheckedCreateWithoutTenantInput[];
494
+ connectOrCreate?: Prisma.PaymentPlanCreateOrConnectWithoutTenantInput | Prisma.PaymentPlanCreateOrConnectWithoutTenantInput[];
495
+ createMany?: Prisma.PaymentPlanCreateManyTenantInputEnvelope;
648
496
  connect?: Prisma.PaymentPlanWhereUniqueInput | Prisma.PaymentPlanWhereUniqueInput[];
649
497
  };
650
- export type PaymentPlanUncheckedCreateNestedManyWithoutPropertyInput = {
651
- create?: Prisma.XOR<Prisma.PaymentPlanCreateWithoutPropertyInput, Prisma.PaymentPlanUncheckedCreateWithoutPropertyInput> | Prisma.PaymentPlanCreateWithoutPropertyInput[] | Prisma.PaymentPlanUncheckedCreateWithoutPropertyInput[];
652
- connectOrCreate?: Prisma.PaymentPlanCreateOrConnectWithoutPropertyInput | Prisma.PaymentPlanCreateOrConnectWithoutPropertyInput[];
653
- createMany?: Prisma.PaymentPlanCreateManyPropertyInputEnvelope;
498
+ export type PaymentPlanUncheckedCreateNestedManyWithoutTenantInput = {
499
+ create?: Prisma.XOR<Prisma.PaymentPlanCreateWithoutTenantInput, Prisma.PaymentPlanUncheckedCreateWithoutTenantInput> | Prisma.PaymentPlanCreateWithoutTenantInput[] | Prisma.PaymentPlanUncheckedCreateWithoutTenantInput[];
500
+ connectOrCreate?: Prisma.PaymentPlanCreateOrConnectWithoutTenantInput | Prisma.PaymentPlanCreateOrConnectWithoutTenantInput[];
501
+ createMany?: Prisma.PaymentPlanCreateManyTenantInputEnvelope;
654
502
  connect?: Prisma.PaymentPlanWhereUniqueInput | Prisma.PaymentPlanWhereUniqueInput[];
655
503
  };
656
- export type PaymentPlanUpdateManyWithoutPropertyNestedInput = {
657
- create?: Prisma.XOR<Prisma.PaymentPlanCreateWithoutPropertyInput, Prisma.PaymentPlanUncheckedCreateWithoutPropertyInput> | Prisma.PaymentPlanCreateWithoutPropertyInput[] | Prisma.PaymentPlanUncheckedCreateWithoutPropertyInput[];
658
- connectOrCreate?: Prisma.PaymentPlanCreateOrConnectWithoutPropertyInput | Prisma.PaymentPlanCreateOrConnectWithoutPropertyInput[];
659
- upsert?: Prisma.PaymentPlanUpsertWithWhereUniqueWithoutPropertyInput | Prisma.PaymentPlanUpsertWithWhereUniqueWithoutPropertyInput[];
660
- createMany?: Prisma.PaymentPlanCreateManyPropertyInputEnvelope;
504
+ export type PaymentPlanUpdateManyWithoutTenantNestedInput = {
505
+ create?: Prisma.XOR<Prisma.PaymentPlanCreateWithoutTenantInput, Prisma.PaymentPlanUncheckedCreateWithoutTenantInput> | Prisma.PaymentPlanCreateWithoutTenantInput[] | Prisma.PaymentPlanUncheckedCreateWithoutTenantInput[];
506
+ connectOrCreate?: Prisma.PaymentPlanCreateOrConnectWithoutTenantInput | Prisma.PaymentPlanCreateOrConnectWithoutTenantInput[];
507
+ upsert?: Prisma.PaymentPlanUpsertWithWhereUniqueWithoutTenantInput | Prisma.PaymentPlanUpsertWithWhereUniqueWithoutTenantInput[];
508
+ createMany?: Prisma.PaymentPlanCreateManyTenantInputEnvelope;
661
509
  set?: Prisma.PaymentPlanWhereUniqueInput | Prisma.PaymentPlanWhereUniqueInput[];
662
510
  disconnect?: Prisma.PaymentPlanWhereUniqueInput | Prisma.PaymentPlanWhereUniqueInput[];
663
511
  delete?: Prisma.PaymentPlanWhereUniqueInput | Prisma.PaymentPlanWhereUniqueInput[];
664
512
  connect?: Prisma.PaymentPlanWhereUniqueInput | Prisma.PaymentPlanWhereUniqueInput[];
665
- update?: Prisma.PaymentPlanUpdateWithWhereUniqueWithoutPropertyInput | Prisma.PaymentPlanUpdateWithWhereUniqueWithoutPropertyInput[];
666
- updateMany?: Prisma.PaymentPlanUpdateManyWithWhereWithoutPropertyInput | Prisma.PaymentPlanUpdateManyWithWhereWithoutPropertyInput[];
513
+ update?: Prisma.PaymentPlanUpdateWithWhereUniqueWithoutTenantInput | Prisma.PaymentPlanUpdateWithWhereUniqueWithoutTenantInput[];
514
+ updateMany?: Prisma.PaymentPlanUpdateManyWithWhereWithoutTenantInput | Prisma.PaymentPlanUpdateManyWithWhereWithoutTenantInput[];
667
515
  deleteMany?: Prisma.PaymentPlanScalarWhereInput | Prisma.PaymentPlanScalarWhereInput[];
668
516
  };
669
- export type PaymentPlanUncheckedUpdateManyWithoutPropertyNestedInput = {
670
- create?: Prisma.XOR<Prisma.PaymentPlanCreateWithoutPropertyInput, Prisma.PaymentPlanUncheckedCreateWithoutPropertyInput> | Prisma.PaymentPlanCreateWithoutPropertyInput[] | Prisma.PaymentPlanUncheckedCreateWithoutPropertyInput[];
671
- connectOrCreate?: Prisma.PaymentPlanCreateOrConnectWithoutPropertyInput | Prisma.PaymentPlanCreateOrConnectWithoutPropertyInput[];
672
- upsert?: Prisma.PaymentPlanUpsertWithWhereUniqueWithoutPropertyInput | Prisma.PaymentPlanUpsertWithWhereUniqueWithoutPropertyInput[];
673
- createMany?: Prisma.PaymentPlanCreateManyPropertyInputEnvelope;
517
+ export type PaymentPlanUncheckedUpdateManyWithoutTenantNestedInput = {
518
+ create?: Prisma.XOR<Prisma.PaymentPlanCreateWithoutTenantInput, Prisma.PaymentPlanUncheckedCreateWithoutTenantInput> | Prisma.PaymentPlanCreateWithoutTenantInput[] | Prisma.PaymentPlanUncheckedCreateWithoutTenantInput[];
519
+ connectOrCreate?: Prisma.PaymentPlanCreateOrConnectWithoutTenantInput | Prisma.PaymentPlanCreateOrConnectWithoutTenantInput[];
520
+ upsert?: Prisma.PaymentPlanUpsertWithWhereUniqueWithoutTenantInput | Prisma.PaymentPlanUpsertWithWhereUniqueWithoutTenantInput[];
521
+ createMany?: Prisma.PaymentPlanCreateManyTenantInputEnvelope;
674
522
  set?: Prisma.PaymentPlanWhereUniqueInput | Prisma.PaymentPlanWhereUniqueInput[];
675
523
  disconnect?: Prisma.PaymentPlanWhereUniqueInput | Prisma.PaymentPlanWhereUniqueInput[];
676
524
  delete?: Prisma.PaymentPlanWhereUniqueInput | Prisma.PaymentPlanWhereUniqueInput[];
677
525
  connect?: Prisma.PaymentPlanWhereUniqueInput | Prisma.PaymentPlanWhereUniqueInput[];
678
- update?: Prisma.PaymentPlanUpdateWithWhereUniqueWithoutPropertyInput | Prisma.PaymentPlanUpdateWithWhereUniqueWithoutPropertyInput[];
679
- updateMany?: Prisma.PaymentPlanUpdateManyWithWhereWithoutPropertyInput | Prisma.PaymentPlanUpdateManyWithWhereWithoutPropertyInput[];
526
+ update?: Prisma.PaymentPlanUpdateWithWhereUniqueWithoutTenantInput | Prisma.PaymentPlanUpdateWithWhereUniqueWithoutTenantInput[];
527
+ updateMany?: Prisma.PaymentPlanUpdateManyWithWhereWithoutTenantInput | Prisma.PaymentPlanUpdateManyWithWhereWithoutTenantInput[];
680
528
  deleteMany?: Prisma.PaymentPlanScalarWhereInput | Prisma.PaymentPlanScalarWhereInput[];
681
529
  };
682
- export type PaymentPlanCreateNestedOneWithoutSchedulesInput = {
683
- create?: Prisma.XOR<Prisma.PaymentPlanCreateWithoutSchedulesInput, Prisma.PaymentPlanUncheckedCreateWithoutSchedulesInput>;
684
- connectOrCreate?: Prisma.PaymentPlanCreateOrConnectWithoutSchedulesInput;
685
- connect?: Prisma.PaymentPlanWhereUniqueInput;
686
- };
687
- export type PaymentPlanUpdateOneRequiredWithoutSchedulesNestedInput = {
688
- create?: Prisma.XOR<Prisma.PaymentPlanCreateWithoutSchedulesInput, Prisma.PaymentPlanUncheckedCreateWithoutSchedulesInput>;
689
- connectOrCreate?: Prisma.PaymentPlanCreateOrConnectWithoutSchedulesInput;
690
- upsert?: Prisma.PaymentPlanUpsertWithoutSchedulesInput;
530
+ export type PaymentPlanCreateNestedOneWithoutMethodPhasesInput = {
531
+ create?: Prisma.XOR<Prisma.PaymentPlanCreateWithoutMethodPhasesInput, Prisma.PaymentPlanUncheckedCreateWithoutMethodPhasesInput>;
532
+ connectOrCreate?: Prisma.PaymentPlanCreateOrConnectWithoutMethodPhasesInput;
691
533
  connect?: Prisma.PaymentPlanWhereUniqueInput;
692
- update?: Prisma.XOR<Prisma.XOR<Prisma.PaymentPlanUpdateToOneWithWhereWithoutSchedulesInput, Prisma.PaymentPlanUpdateWithoutSchedulesInput>, Prisma.PaymentPlanUncheckedUpdateWithoutSchedulesInput>;
693
534
  };
694
- export type PaymentPlanCreateNestedOneWithoutPaymentsInput = {
695
- create?: Prisma.XOR<Prisma.PaymentPlanCreateWithoutPaymentsInput, Prisma.PaymentPlanUncheckedCreateWithoutPaymentsInput>;
696
- connectOrCreate?: Prisma.PaymentPlanCreateOrConnectWithoutPaymentsInput;
697
- connect?: Prisma.PaymentPlanWhereUniqueInput;
698
- };
699
- export type PaymentPlanUpdateOneRequiredWithoutPaymentsNestedInput = {
700
- create?: Prisma.XOR<Prisma.PaymentPlanCreateWithoutPaymentsInput, Prisma.PaymentPlanUncheckedCreateWithoutPaymentsInput>;
701
- connectOrCreate?: Prisma.PaymentPlanCreateOrConnectWithoutPaymentsInput;
702
- upsert?: Prisma.PaymentPlanUpsertWithoutPaymentsInput;
535
+ export type PaymentPlanUpdateOneWithoutMethodPhasesNestedInput = {
536
+ create?: Prisma.XOR<Prisma.PaymentPlanCreateWithoutMethodPhasesInput, Prisma.PaymentPlanUncheckedCreateWithoutMethodPhasesInput>;
537
+ connectOrCreate?: Prisma.PaymentPlanCreateOrConnectWithoutMethodPhasesInput;
538
+ upsert?: Prisma.PaymentPlanUpsertWithoutMethodPhasesInput;
539
+ disconnect?: Prisma.PaymentPlanWhereInput | boolean;
540
+ delete?: Prisma.PaymentPlanWhereInput | boolean;
703
541
  connect?: Prisma.PaymentPlanWhereUniqueInput;
704
- update?: Prisma.XOR<Prisma.XOR<Prisma.PaymentPlanUpdateToOneWithWhereWithoutPaymentsInput, Prisma.PaymentPlanUpdateWithoutPaymentsInput>, Prisma.PaymentPlanUncheckedUpdateWithoutPaymentsInput>;
542
+ update?: Prisma.XOR<Prisma.XOR<Prisma.PaymentPlanUpdateToOneWithWhereWithoutMethodPhasesInput, Prisma.PaymentPlanUpdateWithoutMethodPhasesInput>, Prisma.PaymentPlanUncheckedUpdateWithoutMethodPhasesInput>;
705
543
  };
706
- export type PaymentPlanCreateNestedOneWithoutContractInput = {
707
- create?: Prisma.XOR<Prisma.PaymentPlanCreateWithoutContractInput, Prisma.PaymentPlanUncheckedCreateWithoutContractInput>;
708
- connectOrCreate?: Prisma.PaymentPlanCreateOrConnectWithoutContractInput;
544
+ export type PaymentPlanCreateNestedOneWithoutContractPhasesInput = {
545
+ create?: Prisma.XOR<Prisma.PaymentPlanCreateWithoutContractPhasesInput, Prisma.PaymentPlanUncheckedCreateWithoutContractPhasesInput>;
546
+ connectOrCreate?: Prisma.PaymentPlanCreateOrConnectWithoutContractPhasesInput;
709
547
  connect?: Prisma.PaymentPlanWhereUniqueInput;
710
548
  };
711
- export type PaymentPlanUpdateOneWithoutContractNestedInput = {
712
- create?: Prisma.XOR<Prisma.PaymentPlanCreateWithoutContractInput, Prisma.PaymentPlanUncheckedCreateWithoutContractInput>;
713
- connectOrCreate?: Prisma.PaymentPlanCreateOrConnectWithoutContractInput;
714
- upsert?: Prisma.PaymentPlanUpsertWithoutContractInput;
549
+ export type PaymentPlanUpdateOneWithoutContractPhasesNestedInput = {
550
+ create?: Prisma.XOR<Prisma.PaymentPlanCreateWithoutContractPhasesInput, Prisma.PaymentPlanUncheckedCreateWithoutContractPhasesInput>;
551
+ connectOrCreate?: Prisma.PaymentPlanCreateOrConnectWithoutContractPhasesInput;
552
+ upsert?: Prisma.PaymentPlanUpsertWithoutContractPhasesInput;
715
553
  disconnect?: Prisma.PaymentPlanWhereInput | boolean;
716
554
  delete?: Prisma.PaymentPlanWhereInput | boolean;
717
555
  connect?: Prisma.PaymentPlanWhereUniqueInput;
718
- update?: Prisma.XOR<Prisma.XOR<Prisma.PaymentPlanUpdateToOneWithWhereWithoutContractInput, Prisma.PaymentPlanUpdateWithoutContractInput>, Prisma.PaymentPlanUncheckedUpdateWithoutContractInput>;
556
+ update?: Prisma.XOR<Prisma.XOR<Prisma.PaymentPlanUpdateToOneWithWhereWithoutContractPhasesInput, Prisma.PaymentPlanUpdateWithoutContractPhasesInput>, Prisma.PaymentPlanUncheckedUpdateWithoutContractPhasesInput>;
719
557
  };
720
- export type PaymentPlanCreateWithoutBuyerInput = {
558
+ export type PaymentPlanCreateWithoutTenantInput = {
721
559
  id?: string;
722
- planType: string;
723
560
  name: string;
724
561
  description?: string | null;
725
- totalAmount: number;
726
- downPaymentAmount?: number;
727
- downPaymentPaid?: number;
728
- principalAmount: number;
729
- interestRate?: number;
730
- totalInterest?: number;
731
- state?: string;
732
- stateMetadata?: string | null;
562
+ isActive?: boolean;
563
+ paymentFrequency: string;
564
+ customFrequencyDays?: number | null;
565
+ numberOfInstallments: number;
566
+ calculateInterestDaily?: boolean;
567
+ gracePeriodDays?: number;
733
568
  createdAt?: Date | string;
734
569
  updatedAt?: Date | string;
735
- property: Prisma.PropertyCreateNestedOneWithoutPaymentPlansInput;
736
- contract?: Prisma.ContractCreateNestedOneWithoutPaymentPlanInput;
737
- schedules?: Prisma.PaymentScheduleCreateNestedManyWithoutPlanInput;
738
- payments?: Prisma.PaymentCreateNestedManyWithoutPlanInput;
570
+ methodPhases?: Prisma.PropertyPaymentMethodPhaseCreateNestedManyWithoutPaymentPlanInput;
571
+ contractPhases?: Prisma.ContractPhaseCreateNestedManyWithoutPaymentPlanInput;
739
572
  };
740
- export type PaymentPlanUncheckedCreateWithoutBuyerInput = {
573
+ export type PaymentPlanUncheckedCreateWithoutTenantInput = {
741
574
  id?: string;
742
- propertyId: string;
743
- planType: string;
744
575
  name: string;
745
576
  description?: string | null;
746
- totalAmount: number;
747
- downPaymentAmount?: number;
748
- downPaymentPaid?: number;
749
- principalAmount: number;
750
- interestRate?: number;
751
- totalInterest?: number;
752
- state?: string;
753
- stateMetadata?: string | null;
577
+ isActive?: boolean;
578
+ paymentFrequency: string;
579
+ customFrequencyDays?: number | null;
580
+ numberOfInstallments: number;
581
+ calculateInterestDaily?: boolean;
582
+ gracePeriodDays?: number;
754
583
  createdAt?: Date | string;
755
584
  updatedAt?: Date | string;
756
- contract?: Prisma.ContractUncheckedCreateNestedOneWithoutPaymentPlanInput;
757
- schedules?: Prisma.PaymentScheduleUncheckedCreateNestedManyWithoutPlanInput;
758
- payments?: Prisma.PaymentUncheckedCreateNestedManyWithoutPlanInput;
585
+ methodPhases?: Prisma.PropertyPaymentMethodPhaseUncheckedCreateNestedManyWithoutPaymentPlanInput;
586
+ contractPhases?: Prisma.ContractPhaseUncheckedCreateNestedManyWithoutPaymentPlanInput;
759
587
  };
760
- export type PaymentPlanCreateOrConnectWithoutBuyerInput = {
588
+ export type PaymentPlanCreateOrConnectWithoutTenantInput = {
761
589
  where: Prisma.PaymentPlanWhereUniqueInput;
762
- create: Prisma.XOR<Prisma.PaymentPlanCreateWithoutBuyerInput, Prisma.PaymentPlanUncheckedCreateWithoutBuyerInput>;
590
+ create: Prisma.XOR<Prisma.PaymentPlanCreateWithoutTenantInput, Prisma.PaymentPlanUncheckedCreateWithoutTenantInput>;
763
591
  };
764
- export type PaymentPlanCreateManyBuyerInputEnvelope = {
765
- data: Prisma.PaymentPlanCreateManyBuyerInput | Prisma.PaymentPlanCreateManyBuyerInput[];
592
+ export type PaymentPlanCreateManyTenantInputEnvelope = {
593
+ data: Prisma.PaymentPlanCreateManyTenantInput | Prisma.PaymentPlanCreateManyTenantInput[];
766
594
  skipDuplicates?: boolean;
767
595
  };
768
- export type PaymentPlanUpsertWithWhereUniqueWithoutBuyerInput = {
596
+ export type PaymentPlanUpsertWithWhereUniqueWithoutTenantInput = {
769
597
  where: Prisma.PaymentPlanWhereUniqueInput;
770
- update: Prisma.XOR<Prisma.PaymentPlanUpdateWithoutBuyerInput, Prisma.PaymentPlanUncheckedUpdateWithoutBuyerInput>;
771
- create: Prisma.XOR<Prisma.PaymentPlanCreateWithoutBuyerInput, Prisma.PaymentPlanUncheckedCreateWithoutBuyerInput>;
598
+ update: Prisma.XOR<Prisma.PaymentPlanUpdateWithoutTenantInput, Prisma.PaymentPlanUncheckedUpdateWithoutTenantInput>;
599
+ create: Prisma.XOR<Prisma.PaymentPlanCreateWithoutTenantInput, Prisma.PaymentPlanUncheckedCreateWithoutTenantInput>;
772
600
  };
773
- export type PaymentPlanUpdateWithWhereUniqueWithoutBuyerInput = {
601
+ export type PaymentPlanUpdateWithWhereUniqueWithoutTenantInput = {
774
602
  where: Prisma.PaymentPlanWhereUniqueInput;
775
- data: Prisma.XOR<Prisma.PaymentPlanUpdateWithoutBuyerInput, Prisma.PaymentPlanUncheckedUpdateWithoutBuyerInput>;
603
+ data: Prisma.XOR<Prisma.PaymentPlanUpdateWithoutTenantInput, Prisma.PaymentPlanUncheckedUpdateWithoutTenantInput>;
776
604
  };
777
- export type PaymentPlanUpdateManyWithWhereWithoutBuyerInput = {
605
+ export type PaymentPlanUpdateManyWithWhereWithoutTenantInput = {
778
606
  where: Prisma.PaymentPlanScalarWhereInput;
779
- data: Prisma.XOR<Prisma.PaymentPlanUpdateManyMutationInput, Prisma.PaymentPlanUncheckedUpdateManyWithoutBuyerInput>;
607
+ data: Prisma.XOR<Prisma.PaymentPlanUpdateManyMutationInput, Prisma.PaymentPlanUncheckedUpdateManyWithoutTenantInput>;
780
608
  };
781
609
  export type PaymentPlanScalarWhereInput = {
782
610
  AND?: Prisma.PaymentPlanScalarWhereInput | Prisma.PaymentPlanScalarWhereInput[];
783
611
  OR?: Prisma.PaymentPlanScalarWhereInput[];
784
612
  NOT?: Prisma.PaymentPlanScalarWhereInput | Prisma.PaymentPlanScalarWhereInput[];
785
613
  id?: Prisma.StringFilter<"PaymentPlan"> | string;
786
- propertyId?: Prisma.StringFilter<"PaymentPlan"> | string;
787
- buyerId?: Prisma.StringNullableFilter<"PaymentPlan"> | string | null;
788
- planType?: Prisma.StringFilter<"PaymentPlan"> | string;
614
+ tenantId?: Prisma.StringNullableFilter<"PaymentPlan"> | string | null;
789
615
  name?: Prisma.StringFilter<"PaymentPlan"> | string;
790
616
  description?: Prisma.StringNullableFilter<"PaymentPlan"> | string | null;
791
- totalAmount?: Prisma.FloatFilter<"PaymentPlan"> | number;
792
- downPaymentAmount?: Prisma.FloatFilter<"PaymentPlan"> | number;
793
- downPaymentPaid?: Prisma.FloatFilter<"PaymentPlan"> | number;
794
- principalAmount?: Prisma.FloatFilter<"PaymentPlan"> | number;
795
- interestRate?: Prisma.FloatFilter<"PaymentPlan"> | number;
796
- totalInterest?: Prisma.FloatFilter<"PaymentPlan"> | number;
797
- state?: Prisma.StringFilter<"PaymentPlan"> | string;
798
- stateMetadata?: Prisma.StringNullableFilter<"PaymentPlan"> | string | null;
617
+ isActive?: Prisma.BoolFilter<"PaymentPlan"> | boolean;
618
+ paymentFrequency?: Prisma.StringFilter<"PaymentPlan"> | string;
619
+ customFrequencyDays?: Prisma.IntNullableFilter<"PaymentPlan"> | number | null;
620
+ numberOfInstallments?: Prisma.IntFilter<"PaymentPlan"> | number;
621
+ calculateInterestDaily?: Prisma.BoolFilter<"PaymentPlan"> | boolean;
622
+ gracePeriodDays?: Prisma.IntFilter<"PaymentPlan"> | number;
799
623
  createdAt?: Prisma.DateTimeFilter<"PaymentPlan"> | Date | string;
800
624
  updatedAt?: Prisma.DateTimeFilter<"PaymentPlan"> | Date | string;
801
625
  };
802
- export type PaymentPlanCreateWithoutPropertyInput = {
803
- id?: string;
804
- planType: string;
805
- name: string;
806
- description?: string | null;
807
- totalAmount: number;
808
- downPaymentAmount?: number;
809
- downPaymentPaid?: number;
810
- principalAmount: number;
811
- interestRate?: number;
812
- totalInterest?: number;
813
- state?: string;
814
- stateMetadata?: string | null;
815
- createdAt?: Date | string;
816
- updatedAt?: Date | string;
817
- buyer?: Prisma.UserCreateNestedOneWithoutPaymentPlansInput;
818
- contract?: Prisma.ContractCreateNestedOneWithoutPaymentPlanInput;
819
- schedules?: Prisma.PaymentScheduleCreateNestedManyWithoutPlanInput;
820
- payments?: Prisma.PaymentCreateNestedManyWithoutPlanInput;
821
- };
822
- export type PaymentPlanUncheckedCreateWithoutPropertyInput = {
823
- id?: string;
824
- buyerId?: string | null;
825
- planType: string;
826
- name: string;
827
- description?: string | null;
828
- totalAmount: number;
829
- downPaymentAmount?: number;
830
- downPaymentPaid?: number;
831
- principalAmount: number;
832
- interestRate?: number;
833
- totalInterest?: number;
834
- state?: string;
835
- stateMetadata?: string | null;
836
- createdAt?: Date | string;
837
- updatedAt?: Date | string;
838
- contract?: Prisma.ContractUncheckedCreateNestedOneWithoutPaymentPlanInput;
839
- schedules?: Prisma.PaymentScheduleUncheckedCreateNestedManyWithoutPlanInput;
840
- payments?: Prisma.PaymentUncheckedCreateNestedManyWithoutPlanInput;
841
- };
842
- export type PaymentPlanCreateOrConnectWithoutPropertyInput = {
843
- where: Prisma.PaymentPlanWhereUniqueInput;
844
- create: Prisma.XOR<Prisma.PaymentPlanCreateWithoutPropertyInput, Prisma.PaymentPlanUncheckedCreateWithoutPropertyInput>;
845
- };
846
- export type PaymentPlanCreateManyPropertyInputEnvelope = {
847
- data: Prisma.PaymentPlanCreateManyPropertyInput | Prisma.PaymentPlanCreateManyPropertyInput[];
848
- skipDuplicates?: boolean;
849
- };
850
- export type PaymentPlanUpsertWithWhereUniqueWithoutPropertyInput = {
851
- where: Prisma.PaymentPlanWhereUniqueInput;
852
- update: Prisma.XOR<Prisma.PaymentPlanUpdateWithoutPropertyInput, Prisma.PaymentPlanUncheckedUpdateWithoutPropertyInput>;
853
- create: Prisma.XOR<Prisma.PaymentPlanCreateWithoutPropertyInput, Prisma.PaymentPlanUncheckedCreateWithoutPropertyInput>;
854
- };
855
- export type PaymentPlanUpdateWithWhereUniqueWithoutPropertyInput = {
856
- where: Prisma.PaymentPlanWhereUniqueInput;
857
- data: Prisma.XOR<Prisma.PaymentPlanUpdateWithoutPropertyInput, Prisma.PaymentPlanUncheckedUpdateWithoutPropertyInput>;
858
- };
859
- export type PaymentPlanUpdateManyWithWhereWithoutPropertyInput = {
860
- where: Prisma.PaymentPlanScalarWhereInput;
861
- data: Prisma.XOR<Prisma.PaymentPlanUpdateManyMutationInput, Prisma.PaymentPlanUncheckedUpdateManyWithoutPropertyInput>;
862
- };
863
- export type PaymentPlanCreateWithoutSchedulesInput = {
626
+ export type PaymentPlanCreateWithoutMethodPhasesInput = {
864
627
  id?: string;
865
- planType: string;
866
628
  name: string;
867
629
  description?: string | null;
868
- totalAmount: number;
869
- downPaymentAmount?: number;
870
- downPaymentPaid?: number;
871
- principalAmount: number;
872
- interestRate?: number;
873
- totalInterest?: number;
874
- state?: string;
875
- stateMetadata?: string | null;
630
+ isActive?: boolean;
631
+ paymentFrequency: string;
632
+ customFrequencyDays?: number | null;
633
+ numberOfInstallments: number;
634
+ calculateInterestDaily?: boolean;
635
+ gracePeriodDays?: number;
876
636
  createdAt?: Date | string;
877
637
  updatedAt?: Date | string;
878
- property: Prisma.PropertyCreateNestedOneWithoutPaymentPlansInput;
879
- buyer?: Prisma.UserCreateNestedOneWithoutPaymentPlansInput;
880
- contract?: Prisma.ContractCreateNestedOneWithoutPaymentPlanInput;
881
- payments?: Prisma.PaymentCreateNestedManyWithoutPlanInput;
638
+ tenant?: Prisma.TenantCreateNestedOneWithoutPaymentPlansInput;
639
+ contractPhases?: Prisma.ContractPhaseCreateNestedManyWithoutPaymentPlanInput;
882
640
  };
883
- export type PaymentPlanUncheckedCreateWithoutSchedulesInput = {
641
+ export type PaymentPlanUncheckedCreateWithoutMethodPhasesInput = {
884
642
  id?: string;
885
- propertyId: string;
886
- buyerId?: string | null;
887
- planType: string;
643
+ tenantId?: string | null;
888
644
  name: string;
889
645
  description?: string | null;
890
- totalAmount: number;
891
- downPaymentAmount?: number;
892
- downPaymentPaid?: number;
893
- principalAmount: number;
894
- interestRate?: number;
895
- totalInterest?: number;
896
- state?: string;
897
- stateMetadata?: string | null;
646
+ isActive?: boolean;
647
+ paymentFrequency: string;
648
+ customFrequencyDays?: number | null;
649
+ numberOfInstallments: number;
650
+ calculateInterestDaily?: boolean;
651
+ gracePeriodDays?: number;
898
652
  createdAt?: Date | string;
899
653
  updatedAt?: Date | string;
900
- contract?: Prisma.ContractUncheckedCreateNestedOneWithoutPaymentPlanInput;
901
- payments?: Prisma.PaymentUncheckedCreateNestedManyWithoutPlanInput;
654
+ contractPhases?: Prisma.ContractPhaseUncheckedCreateNestedManyWithoutPaymentPlanInput;
902
655
  };
903
- export type PaymentPlanCreateOrConnectWithoutSchedulesInput = {
656
+ export type PaymentPlanCreateOrConnectWithoutMethodPhasesInput = {
904
657
  where: Prisma.PaymentPlanWhereUniqueInput;
905
- create: Prisma.XOR<Prisma.PaymentPlanCreateWithoutSchedulesInput, Prisma.PaymentPlanUncheckedCreateWithoutSchedulesInput>;
658
+ create: Prisma.XOR<Prisma.PaymentPlanCreateWithoutMethodPhasesInput, Prisma.PaymentPlanUncheckedCreateWithoutMethodPhasesInput>;
906
659
  };
907
- export type PaymentPlanUpsertWithoutSchedulesInput = {
908
- update: Prisma.XOR<Prisma.PaymentPlanUpdateWithoutSchedulesInput, Prisma.PaymentPlanUncheckedUpdateWithoutSchedulesInput>;
909
- create: Prisma.XOR<Prisma.PaymentPlanCreateWithoutSchedulesInput, Prisma.PaymentPlanUncheckedCreateWithoutSchedulesInput>;
660
+ export type PaymentPlanUpsertWithoutMethodPhasesInput = {
661
+ update: Prisma.XOR<Prisma.PaymentPlanUpdateWithoutMethodPhasesInput, Prisma.PaymentPlanUncheckedUpdateWithoutMethodPhasesInput>;
662
+ create: Prisma.XOR<Prisma.PaymentPlanCreateWithoutMethodPhasesInput, Prisma.PaymentPlanUncheckedCreateWithoutMethodPhasesInput>;
910
663
  where?: Prisma.PaymentPlanWhereInput;
911
664
  };
912
- export type PaymentPlanUpdateToOneWithWhereWithoutSchedulesInput = {
665
+ export type PaymentPlanUpdateToOneWithWhereWithoutMethodPhasesInput = {
913
666
  where?: Prisma.PaymentPlanWhereInput;
914
- data: Prisma.XOR<Prisma.PaymentPlanUpdateWithoutSchedulesInput, Prisma.PaymentPlanUncheckedUpdateWithoutSchedulesInput>;
667
+ data: Prisma.XOR<Prisma.PaymentPlanUpdateWithoutMethodPhasesInput, Prisma.PaymentPlanUncheckedUpdateWithoutMethodPhasesInput>;
915
668
  };
916
- export type PaymentPlanUpdateWithoutSchedulesInput = {
669
+ export type PaymentPlanUpdateWithoutMethodPhasesInput = {
917
670
  id?: Prisma.StringFieldUpdateOperationsInput | string;
918
- planType?: Prisma.StringFieldUpdateOperationsInput | string;
919
671
  name?: Prisma.StringFieldUpdateOperationsInput | string;
920
672
  description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
921
- totalAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
922
- downPaymentAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
923
- downPaymentPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
924
- principalAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
925
- interestRate?: Prisma.FloatFieldUpdateOperationsInput | number;
926
- totalInterest?: Prisma.FloatFieldUpdateOperationsInput | number;
927
- state?: Prisma.StringFieldUpdateOperationsInput | string;
928
- stateMetadata?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
673
+ isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean;
674
+ paymentFrequency?: Prisma.StringFieldUpdateOperationsInput | string;
675
+ customFrequencyDays?: Prisma.NullableIntFieldUpdateOperationsInput | number | null;
676
+ numberOfInstallments?: Prisma.IntFieldUpdateOperationsInput | number;
677
+ calculateInterestDaily?: Prisma.BoolFieldUpdateOperationsInput | boolean;
678
+ gracePeriodDays?: Prisma.IntFieldUpdateOperationsInput | number;
929
679
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
930
680
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
931
- property?: Prisma.PropertyUpdateOneRequiredWithoutPaymentPlansNestedInput;
932
- buyer?: Prisma.UserUpdateOneWithoutPaymentPlansNestedInput;
933
- contract?: Prisma.ContractUpdateOneWithoutPaymentPlanNestedInput;
934
- payments?: Prisma.PaymentUpdateManyWithoutPlanNestedInput;
681
+ tenant?: Prisma.TenantUpdateOneWithoutPaymentPlansNestedInput;
682
+ contractPhases?: Prisma.ContractPhaseUpdateManyWithoutPaymentPlanNestedInput;
935
683
  };
936
- export type PaymentPlanUncheckedUpdateWithoutSchedulesInput = {
684
+ export type PaymentPlanUncheckedUpdateWithoutMethodPhasesInput = {
937
685
  id?: Prisma.StringFieldUpdateOperationsInput | string;
938
- propertyId?: Prisma.StringFieldUpdateOperationsInput | string;
939
- buyerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
940
- planType?: Prisma.StringFieldUpdateOperationsInput | string;
686
+ tenantId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
941
687
  name?: Prisma.StringFieldUpdateOperationsInput | string;
942
688
  description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
943
- totalAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
944
- downPaymentAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
945
- downPaymentPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
946
- principalAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
947
- interestRate?: Prisma.FloatFieldUpdateOperationsInput | number;
948
- totalInterest?: Prisma.FloatFieldUpdateOperationsInput | number;
949
- state?: Prisma.StringFieldUpdateOperationsInput | string;
950
- stateMetadata?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
689
+ isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean;
690
+ paymentFrequency?: Prisma.StringFieldUpdateOperationsInput | string;
691
+ customFrequencyDays?: Prisma.NullableIntFieldUpdateOperationsInput | number | null;
692
+ numberOfInstallments?: Prisma.IntFieldUpdateOperationsInput | number;
693
+ calculateInterestDaily?: Prisma.BoolFieldUpdateOperationsInput | boolean;
694
+ gracePeriodDays?: Prisma.IntFieldUpdateOperationsInput | number;
951
695
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
952
696
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
953
- contract?: Prisma.ContractUncheckedUpdateOneWithoutPaymentPlanNestedInput;
954
- payments?: Prisma.PaymentUncheckedUpdateManyWithoutPlanNestedInput;
697
+ contractPhases?: Prisma.ContractPhaseUncheckedUpdateManyWithoutPaymentPlanNestedInput;
955
698
  };
956
- export type PaymentPlanCreateWithoutPaymentsInput = {
699
+ export type PaymentPlanCreateWithoutContractPhasesInput = {
957
700
  id?: string;
958
- planType: string;
959
701
  name: string;
960
702
  description?: string | null;
961
- totalAmount: number;
962
- downPaymentAmount?: number;
963
- downPaymentPaid?: number;
964
- principalAmount: number;
965
- interestRate?: number;
966
- totalInterest?: number;
967
- state?: string;
968
- stateMetadata?: string | null;
703
+ isActive?: boolean;
704
+ paymentFrequency: string;
705
+ customFrequencyDays?: number | null;
706
+ numberOfInstallments: number;
707
+ calculateInterestDaily?: boolean;
708
+ gracePeriodDays?: number;
969
709
  createdAt?: Date | string;
970
710
  updatedAt?: Date | string;
971
- property: Prisma.PropertyCreateNestedOneWithoutPaymentPlansInput;
972
- buyer?: Prisma.UserCreateNestedOneWithoutPaymentPlansInput;
973
- contract?: Prisma.ContractCreateNestedOneWithoutPaymentPlanInput;
974
- schedules?: Prisma.PaymentScheduleCreateNestedManyWithoutPlanInput;
711
+ tenant?: Prisma.TenantCreateNestedOneWithoutPaymentPlansInput;
712
+ methodPhases?: Prisma.PropertyPaymentMethodPhaseCreateNestedManyWithoutPaymentPlanInput;
975
713
  };
976
- export type PaymentPlanUncheckedCreateWithoutPaymentsInput = {
714
+ export type PaymentPlanUncheckedCreateWithoutContractPhasesInput = {
977
715
  id?: string;
978
- propertyId: string;
979
- buyerId?: string | null;
980
- planType: string;
716
+ tenantId?: string | null;
981
717
  name: string;
982
718
  description?: string | null;
983
- totalAmount: number;
984
- downPaymentAmount?: number;
985
- downPaymentPaid?: number;
986
- principalAmount: number;
987
- interestRate?: number;
988
- totalInterest?: number;
989
- state?: string;
990
- stateMetadata?: string | null;
719
+ isActive?: boolean;
720
+ paymentFrequency: string;
721
+ customFrequencyDays?: number | null;
722
+ numberOfInstallments: number;
723
+ calculateInterestDaily?: boolean;
724
+ gracePeriodDays?: number;
991
725
  createdAt?: Date | string;
992
726
  updatedAt?: Date | string;
993
- contract?: Prisma.ContractUncheckedCreateNestedOneWithoutPaymentPlanInput;
994
- schedules?: Prisma.PaymentScheduleUncheckedCreateNestedManyWithoutPlanInput;
727
+ methodPhases?: Prisma.PropertyPaymentMethodPhaseUncheckedCreateNestedManyWithoutPaymentPlanInput;
995
728
  };
996
- export type PaymentPlanCreateOrConnectWithoutPaymentsInput = {
729
+ export type PaymentPlanCreateOrConnectWithoutContractPhasesInput = {
997
730
  where: Prisma.PaymentPlanWhereUniqueInput;
998
- create: Prisma.XOR<Prisma.PaymentPlanCreateWithoutPaymentsInput, Prisma.PaymentPlanUncheckedCreateWithoutPaymentsInput>;
731
+ create: Prisma.XOR<Prisma.PaymentPlanCreateWithoutContractPhasesInput, Prisma.PaymentPlanUncheckedCreateWithoutContractPhasesInput>;
999
732
  };
1000
- export type PaymentPlanUpsertWithoutPaymentsInput = {
1001
- update: Prisma.XOR<Prisma.PaymentPlanUpdateWithoutPaymentsInput, Prisma.PaymentPlanUncheckedUpdateWithoutPaymentsInput>;
1002
- create: Prisma.XOR<Prisma.PaymentPlanCreateWithoutPaymentsInput, Prisma.PaymentPlanUncheckedCreateWithoutPaymentsInput>;
733
+ export type PaymentPlanUpsertWithoutContractPhasesInput = {
734
+ update: Prisma.XOR<Prisma.PaymentPlanUpdateWithoutContractPhasesInput, Prisma.PaymentPlanUncheckedUpdateWithoutContractPhasesInput>;
735
+ create: Prisma.XOR<Prisma.PaymentPlanCreateWithoutContractPhasesInput, Prisma.PaymentPlanUncheckedCreateWithoutContractPhasesInput>;
1003
736
  where?: Prisma.PaymentPlanWhereInput;
1004
737
  };
1005
- export type PaymentPlanUpdateToOneWithWhereWithoutPaymentsInput = {
738
+ export type PaymentPlanUpdateToOneWithWhereWithoutContractPhasesInput = {
1006
739
  where?: Prisma.PaymentPlanWhereInput;
1007
- data: Prisma.XOR<Prisma.PaymentPlanUpdateWithoutPaymentsInput, Prisma.PaymentPlanUncheckedUpdateWithoutPaymentsInput>;
740
+ data: Prisma.XOR<Prisma.PaymentPlanUpdateWithoutContractPhasesInput, Prisma.PaymentPlanUncheckedUpdateWithoutContractPhasesInput>;
1008
741
  };
1009
- export type PaymentPlanUpdateWithoutPaymentsInput = {
742
+ export type PaymentPlanUpdateWithoutContractPhasesInput = {
1010
743
  id?: Prisma.StringFieldUpdateOperationsInput | string;
1011
- planType?: Prisma.StringFieldUpdateOperationsInput | string;
1012
744
  name?: Prisma.StringFieldUpdateOperationsInput | string;
1013
745
  description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1014
- totalAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
1015
- downPaymentAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
1016
- downPaymentPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
1017
- principalAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
1018
- interestRate?: Prisma.FloatFieldUpdateOperationsInput | number;
1019
- totalInterest?: Prisma.FloatFieldUpdateOperationsInput | number;
1020
- state?: Prisma.StringFieldUpdateOperationsInput | string;
1021
- stateMetadata?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
746
+ isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean;
747
+ paymentFrequency?: Prisma.StringFieldUpdateOperationsInput | string;
748
+ customFrequencyDays?: Prisma.NullableIntFieldUpdateOperationsInput | number | null;
749
+ numberOfInstallments?: Prisma.IntFieldUpdateOperationsInput | number;
750
+ calculateInterestDaily?: Prisma.BoolFieldUpdateOperationsInput | boolean;
751
+ gracePeriodDays?: Prisma.IntFieldUpdateOperationsInput | number;
1022
752
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
1023
753
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
1024
- property?: Prisma.PropertyUpdateOneRequiredWithoutPaymentPlansNestedInput;
1025
- buyer?: Prisma.UserUpdateOneWithoutPaymentPlansNestedInput;
1026
- contract?: Prisma.ContractUpdateOneWithoutPaymentPlanNestedInput;
1027
- schedules?: Prisma.PaymentScheduleUpdateManyWithoutPlanNestedInput;
754
+ tenant?: Prisma.TenantUpdateOneWithoutPaymentPlansNestedInput;
755
+ methodPhases?: Prisma.PropertyPaymentMethodPhaseUpdateManyWithoutPaymentPlanNestedInput;
1028
756
  };
1029
- export type PaymentPlanUncheckedUpdateWithoutPaymentsInput = {
757
+ export type PaymentPlanUncheckedUpdateWithoutContractPhasesInput = {
1030
758
  id?: Prisma.StringFieldUpdateOperationsInput | string;
1031
- propertyId?: Prisma.StringFieldUpdateOperationsInput | string;
1032
- buyerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1033
- planType?: Prisma.StringFieldUpdateOperationsInput | string;
759
+ tenantId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1034
760
  name?: Prisma.StringFieldUpdateOperationsInput | string;
1035
761
  description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1036
- totalAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
1037
- downPaymentAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
1038
- downPaymentPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
1039
- principalAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
1040
- interestRate?: Prisma.FloatFieldUpdateOperationsInput | number;
1041
- totalInterest?: Prisma.FloatFieldUpdateOperationsInput | number;
1042
- state?: Prisma.StringFieldUpdateOperationsInput | string;
1043
- stateMetadata?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
762
+ isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean;
763
+ paymentFrequency?: Prisma.StringFieldUpdateOperationsInput | string;
764
+ customFrequencyDays?: Prisma.NullableIntFieldUpdateOperationsInput | number | null;
765
+ numberOfInstallments?: Prisma.IntFieldUpdateOperationsInput | number;
766
+ calculateInterestDaily?: Prisma.BoolFieldUpdateOperationsInput | boolean;
767
+ gracePeriodDays?: Prisma.IntFieldUpdateOperationsInput | number;
1044
768
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
1045
769
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
1046
- contract?: Prisma.ContractUncheckedUpdateOneWithoutPaymentPlanNestedInput;
1047
- schedules?: Prisma.PaymentScheduleUncheckedUpdateManyWithoutPlanNestedInput;
1048
- };
1049
- export type PaymentPlanCreateWithoutContractInput = {
1050
- id?: string;
1051
- planType: string;
1052
- name: string;
1053
- description?: string | null;
1054
- totalAmount: number;
1055
- downPaymentAmount?: number;
1056
- downPaymentPaid?: number;
1057
- principalAmount: number;
1058
- interestRate?: number;
1059
- totalInterest?: number;
1060
- state?: string;
1061
- stateMetadata?: string | null;
1062
- createdAt?: Date | string;
1063
- updatedAt?: Date | string;
1064
- property: Prisma.PropertyCreateNestedOneWithoutPaymentPlansInput;
1065
- buyer?: Prisma.UserCreateNestedOneWithoutPaymentPlansInput;
1066
- schedules?: Prisma.PaymentScheduleCreateNestedManyWithoutPlanInput;
1067
- payments?: Prisma.PaymentCreateNestedManyWithoutPlanInput;
770
+ methodPhases?: Prisma.PropertyPaymentMethodPhaseUncheckedUpdateManyWithoutPaymentPlanNestedInput;
1068
771
  };
1069
- export type PaymentPlanUncheckedCreateWithoutContractInput = {
772
+ export type PaymentPlanCreateManyTenantInput = {
1070
773
  id?: string;
1071
- propertyId: string;
1072
- buyerId?: string | null;
1073
- planType: string;
1074
774
  name: string;
1075
775
  description?: string | null;
1076
- totalAmount: number;
1077
- downPaymentAmount?: number;
1078
- downPaymentPaid?: number;
1079
- principalAmount: number;
1080
- interestRate?: number;
1081
- totalInterest?: number;
1082
- state?: string;
1083
- stateMetadata?: string | null;
776
+ isActive?: boolean;
777
+ paymentFrequency: string;
778
+ customFrequencyDays?: number | null;
779
+ numberOfInstallments: number;
780
+ calculateInterestDaily?: boolean;
781
+ gracePeriodDays?: number;
1084
782
  createdAt?: Date | string;
1085
783
  updatedAt?: Date | string;
1086
- schedules?: Prisma.PaymentScheduleUncheckedCreateNestedManyWithoutPlanInput;
1087
- payments?: Prisma.PaymentUncheckedCreateNestedManyWithoutPlanInput;
1088
784
  };
1089
- export type PaymentPlanCreateOrConnectWithoutContractInput = {
1090
- where: Prisma.PaymentPlanWhereUniqueInput;
1091
- create: Prisma.XOR<Prisma.PaymentPlanCreateWithoutContractInput, Prisma.PaymentPlanUncheckedCreateWithoutContractInput>;
1092
- };
1093
- export type PaymentPlanUpsertWithoutContractInput = {
1094
- update: Prisma.XOR<Prisma.PaymentPlanUpdateWithoutContractInput, Prisma.PaymentPlanUncheckedUpdateWithoutContractInput>;
1095
- create: Prisma.XOR<Prisma.PaymentPlanCreateWithoutContractInput, Prisma.PaymentPlanUncheckedCreateWithoutContractInput>;
1096
- where?: Prisma.PaymentPlanWhereInput;
1097
- };
1098
- export type PaymentPlanUpdateToOneWithWhereWithoutContractInput = {
1099
- where?: Prisma.PaymentPlanWhereInput;
1100
- data: Prisma.XOR<Prisma.PaymentPlanUpdateWithoutContractInput, Prisma.PaymentPlanUncheckedUpdateWithoutContractInput>;
1101
- };
1102
- export type PaymentPlanUpdateWithoutContractInput = {
1103
- id?: Prisma.StringFieldUpdateOperationsInput | string;
1104
- planType?: Prisma.StringFieldUpdateOperationsInput | string;
1105
- name?: Prisma.StringFieldUpdateOperationsInput | string;
1106
- description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1107
- totalAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
1108
- downPaymentAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
1109
- downPaymentPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
1110
- principalAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
1111
- interestRate?: Prisma.FloatFieldUpdateOperationsInput | number;
1112
- totalInterest?: Prisma.FloatFieldUpdateOperationsInput | number;
1113
- state?: Prisma.StringFieldUpdateOperationsInput | string;
1114
- stateMetadata?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1115
- createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
1116
- updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
1117
- property?: Prisma.PropertyUpdateOneRequiredWithoutPaymentPlansNestedInput;
1118
- buyer?: Prisma.UserUpdateOneWithoutPaymentPlansNestedInput;
1119
- schedules?: Prisma.PaymentScheduleUpdateManyWithoutPlanNestedInput;
1120
- payments?: Prisma.PaymentUpdateManyWithoutPlanNestedInput;
1121
- };
1122
- export type PaymentPlanUncheckedUpdateWithoutContractInput = {
1123
- id?: Prisma.StringFieldUpdateOperationsInput | string;
1124
- propertyId?: Prisma.StringFieldUpdateOperationsInput | string;
1125
- buyerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1126
- planType?: Prisma.StringFieldUpdateOperationsInput | string;
1127
- name?: Prisma.StringFieldUpdateOperationsInput | string;
1128
- description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1129
- totalAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
1130
- downPaymentAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
1131
- downPaymentPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
1132
- principalAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
1133
- interestRate?: Prisma.FloatFieldUpdateOperationsInput | number;
1134
- totalInterest?: Prisma.FloatFieldUpdateOperationsInput | number;
1135
- state?: Prisma.StringFieldUpdateOperationsInput | string;
1136
- stateMetadata?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1137
- createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
1138
- updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
1139
- schedules?: Prisma.PaymentScheduleUncheckedUpdateManyWithoutPlanNestedInput;
1140
- payments?: Prisma.PaymentUncheckedUpdateManyWithoutPlanNestedInput;
1141
- };
1142
- export type PaymentPlanCreateManyBuyerInput = {
1143
- id?: string;
1144
- propertyId: string;
1145
- planType: string;
1146
- name: string;
1147
- description?: string | null;
1148
- totalAmount: number;
1149
- downPaymentAmount?: number;
1150
- downPaymentPaid?: number;
1151
- principalAmount: number;
1152
- interestRate?: number;
1153
- totalInterest?: number;
1154
- state?: string;
1155
- stateMetadata?: string | null;
1156
- createdAt?: Date | string;
1157
- updatedAt?: Date | string;
1158
- };
1159
- export type PaymentPlanUpdateWithoutBuyerInput = {
785
+ export type PaymentPlanUpdateWithoutTenantInput = {
1160
786
  id?: Prisma.StringFieldUpdateOperationsInput | string;
1161
- planType?: Prisma.StringFieldUpdateOperationsInput | string;
1162
787
  name?: Prisma.StringFieldUpdateOperationsInput | string;
1163
788
  description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1164
- totalAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
1165
- downPaymentAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
1166
- downPaymentPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
1167
- principalAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
1168
- interestRate?: Prisma.FloatFieldUpdateOperationsInput | number;
1169
- totalInterest?: Prisma.FloatFieldUpdateOperationsInput | number;
1170
- state?: Prisma.StringFieldUpdateOperationsInput | string;
1171
- stateMetadata?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
789
+ isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean;
790
+ paymentFrequency?: Prisma.StringFieldUpdateOperationsInput | string;
791
+ customFrequencyDays?: Prisma.NullableIntFieldUpdateOperationsInput | number | null;
792
+ numberOfInstallments?: Prisma.IntFieldUpdateOperationsInput | number;
793
+ calculateInterestDaily?: Prisma.BoolFieldUpdateOperationsInput | boolean;
794
+ gracePeriodDays?: Prisma.IntFieldUpdateOperationsInput | number;
1172
795
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
1173
796
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
1174
- property?: Prisma.PropertyUpdateOneRequiredWithoutPaymentPlansNestedInput;
1175
- contract?: Prisma.ContractUpdateOneWithoutPaymentPlanNestedInput;
1176
- schedules?: Prisma.PaymentScheduleUpdateManyWithoutPlanNestedInput;
1177
- payments?: Prisma.PaymentUpdateManyWithoutPlanNestedInput;
797
+ methodPhases?: Prisma.PropertyPaymentMethodPhaseUpdateManyWithoutPaymentPlanNestedInput;
798
+ contractPhases?: Prisma.ContractPhaseUpdateManyWithoutPaymentPlanNestedInput;
1178
799
  };
1179
- export type PaymentPlanUncheckedUpdateWithoutBuyerInput = {
800
+ export type PaymentPlanUncheckedUpdateWithoutTenantInput = {
1180
801
  id?: Prisma.StringFieldUpdateOperationsInput | string;
1181
- propertyId?: Prisma.StringFieldUpdateOperationsInput | string;
1182
- planType?: Prisma.StringFieldUpdateOperationsInput | string;
1183
802
  name?: Prisma.StringFieldUpdateOperationsInput | string;
1184
803
  description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1185
- totalAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
1186
- downPaymentAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
1187
- downPaymentPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
1188
- principalAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
1189
- interestRate?: Prisma.FloatFieldUpdateOperationsInput | number;
1190
- totalInterest?: Prisma.FloatFieldUpdateOperationsInput | number;
1191
- state?: Prisma.StringFieldUpdateOperationsInput | string;
1192
- stateMetadata?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
804
+ isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean;
805
+ paymentFrequency?: Prisma.StringFieldUpdateOperationsInput | string;
806
+ customFrequencyDays?: Prisma.NullableIntFieldUpdateOperationsInput | number | null;
807
+ numberOfInstallments?: Prisma.IntFieldUpdateOperationsInput | number;
808
+ calculateInterestDaily?: Prisma.BoolFieldUpdateOperationsInput | boolean;
809
+ gracePeriodDays?: Prisma.IntFieldUpdateOperationsInput | number;
1193
810
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
1194
811
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
1195
- contract?: Prisma.ContractUncheckedUpdateOneWithoutPaymentPlanNestedInput;
1196
- schedules?: Prisma.PaymentScheduleUncheckedUpdateManyWithoutPlanNestedInput;
1197
- payments?: Prisma.PaymentUncheckedUpdateManyWithoutPlanNestedInput;
812
+ methodPhases?: Prisma.PropertyPaymentMethodPhaseUncheckedUpdateManyWithoutPaymentPlanNestedInput;
813
+ contractPhases?: Prisma.ContractPhaseUncheckedUpdateManyWithoutPaymentPlanNestedInput;
1198
814
  };
1199
- export type PaymentPlanUncheckedUpdateManyWithoutBuyerInput = {
815
+ export type PaymentPlanUncheckedUpdateManyWithoutTenantInput = {
1200
816
  id?: Prisma.StringFieldUpdateOperationsInput | string;
1201
- propertyId?: Prisma.StringFieldUpdateOperationsInput | string;
1202
- planType?: Prisma.StringFieldUpdateOperationsInput | string;
1203
817
  name?: Prisma.StringFieldUpdateOperationsInput | string;
1204
818
  description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1205
- totalAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
1206
- downPaymentAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
1207
- downPaymentPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
1208
- principalAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
1209
- interestRate?: Prisma.FloatFieldUpdateOperationsInput | number;
1210
- totalInterest?: Prisma.FloatFieldUpdateOperationsInput | number;
1211
- state?: Prisma.StringFieldUpdateOperationsInput | string;
1212
- stateMetadata?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1213
- createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
1214
- updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
1215
- };
1216
- export type PaymentPlanCreateManyPropertyInput = {
1217
- id?: string;
1218
- buyerId?: string | null;
1219
- planType: string;
1220
- name: string;
1221
- description?: string | null;
1222
- totalAmount: number;
1223
- downPaymentAmount?: number;
1224
- downPaymentPaid?: number;
1225
- principalAmount: number;
1226
- interestRate?: number;
1227
- totalInterest?: number;
1228
- state?: string;
1229
- stateMetadata?: string | null;
1230
- createdAt?: Date | string;
1231
- updatedAt?: Date | string;
1232
- };
1233
- export type PaymentPlanUpdateWithoutPropertyInput = {
1234
- id?: Prisma.StringFieldUpdateOperationsInput | string;
1235
- planType?: Prisma.StringFieldUpdateOperationsInput | string;
1236
- name?: Prisma.StringFieldUpdateOperationsInput | string;
1237
- description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1238
- totalAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
1239
- downPaymentAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
1240
- downPaymentPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
1241
- principalAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
1242
- interestRate?: Prisma.FloatFieldUpdateOperationsInput | number;
1243
- totalInterest?: Prisma.FloatFieldUpdateOperationsInput | number;
1244
- state?: Prisma.StringFieldUpdateOperationsInput | string;
1245
- stateMetadata?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1246
- createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
1247
- updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
1248
- buyer?: Prisma.UserUpdateOneWithoutPaymentPlansNestedInput;
1249
- contract?: Prisma.ContractUpdateOneWithoutPaymentPlanNestedInput;
1250
- schedules?: Prisma.PaymentScheduleUpdateManyWithoutPlanNestedInput;
1251
- payments?: Prisma.PaymentUpdateManyWithoutPlanNestedInput;
1252
- };
1253
- export type PaymentPlanUncheckedUpdateWithoutPropertyInput = {
1254
- id?: Prisma.StringFieldUpdateOperationsInput | string;
1255
- buyerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1256
- planType?: Prisma.StringFieldUpdateOperationsInput | string;
1257
- name?: Prisma.StringFieldUpdateOperationsInput | string;
1258
- description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1259
- totalAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
1260
- downPaymentAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
1261
- downPaymentPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
1262
- principalAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
1263
- interestRate?: Prisma.FloatFieldUpdateOperationsInput | number;
1264
- totalInterest?: Prisma.FloatFieldUpdateOperationsInput | number;
1265
- state?: Prisma.StringFieldUpdateOperationsInput | string;
1266
- stateMetadata?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1267
- createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
1268
- updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
1269
- contract?: Prisma.ContractUncheckedUpdateOneWithoutPaymentPlanNestedInput;
1270
- schedules?: Prisma.PaymentScheduleUncheckedUpdateManyWithoutPlanNestedInput;
1271
- payments?: Prisma.PaymentUncheckedUpdateManyWithoutPlanNestedInput;
1272
- };
1273
- export type PaymentPlanUncheckedUpdateManyWithoutPropertyInput = {
1274
- id?: Prisma.StringFieldUpdateOperationsInput | string;
1275
- buyerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1276
- planType?: Prisma.StringFieldUpdateOperationsInput | string;
1277
- name?: Prisma.StringFieldUpdateOperationsInput | string;
1278
- description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1279
- totalAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
1280
- downPaymentAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
1281
- downPaymentPaid?: Prisma.FloatFieldUpdateOperationsInput | number;
1282
- principalAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
1283
- interestRate?: Prisma.FloatFieldUpdateOperationsInput | number;
1284
- totalInterest?: Prisma.FloatFieldUpdateOperationsInput | number;
1285
- state?: Prisma.StringFieldUpdateOperationsInput | string;
1286
- stateMetadata?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
819
+ isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean;
820
+ paymentFrequency?: Prisma.StringFieldUpdateOperationsInput | string;
821
+ customFrequencyDays?: Prisma.NullableIntFieldUpdateOperationsInput | number | null;
822
+ numberOfInstallments?: Prisma.IntFieldUpdateOperationsInput | number;
823
+ calculateInterestDaily?: Prisma.BoolFieldUpdateOperationsInput | boolean;
824
+ gracePeriodDays?: Prisma.IntFieldUpdateOperationsInput | number;
1287
825
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
1288
826
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
1289
827
  };
@@ -1291,12 +829,12 @@ export type PaymentPlanUncheckedUpdateManyWithoutPropertyInput = {
1291
829
  * Count Type PaymentPlanCountOutputType
1292
830
  */
1293
831
  export type PaymentPlanCountOutputType = {
1294
- schedules: number;
1295
- payments: number;
832
+ methodPhases: number;
833
+ contractPhases: number;
1296
834
  };
1297
835
  export type PaymentPlanCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1298
- schedules?: boolean | PaymentPlanCountOutputTypeCountSchedulesArgs;
1299
- payments?: boolean | PaymentPlanCountOutputTypeCountPaymentsArgs;
836
+ methodPhases?: boolean | PaymentPlanCountOutputTypeCountMethodPhasesArgs;
837
+ contractPhases?: boolean | PaymentPlanCountOutputTypeCountContractPhasesArgs;
1300
838
  };
1301
839
  /**
1302
840
  * PaymentPlanCountOutputType without action
@@ -1310,90 +848,72 @@ export type PaymentPlanCountOutputTypeDefaultArgs<ExtArgs extends runtime.Types.
1310
848
  /**
1311
849
  * PaymentPlanCountOutputType without action
1312
850
  */
1313
- export type PaymentPlanCountOutputTypeCountSchedulesArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1314
- where?: Prisma.PaymentScheduleWhereInput;
851
+ export type PaymentPlanCountOutputTypeCountMethodPhasesArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
852
+ where?: Prisma.PropertyPaymentMethodPhaseWhereInput;
1315
853
  };
1316
854
  /**
1317
855
  * PaymentPlanCountOutputType without action
1318
856
  */
1319
- export type PaymentPlanCountOutputTypeCountPaymentsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1320
- where?: Prisma.PaymentWhereInput;
857
+ export type PaymentPlanCountOutputTypeCountContractPhasesArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
858
+ where?: Prisma.ContractPhaseWhereInput;
1321
859
  };
1322
860
  export type PaymentPlanSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
1323
861
  id?: boolean;
1324
- propertyId?: boolean;
1325
- buyerId?: boolean;
1326
- planType?: boolean;
862
+ tenantId?: boolean;
1327
863
  name?: boolean;
1328
864
  description?: boolean;
1329
- totalAmount?: boolean;
1330
- downPaymentAmount?: boolean;
1331
- downPaymentPaid?: boolean;
1332
- principalAmount?: boolean;
1333
- interestRate?: boolean;
1334
- totalInterest?: boolean;
1335
- state?: boolean;
1336
- stateMetadata?: boolean;
865
+ isActive?: boolean;
866
+ paymentFrequency?: boolean;
867
+ customFrequencyDays?: boolean;
868
+ numberOfInstallments?: boolean;
869
+ calculateInterestDaily?: boolean;
870
+ gracePeriodDays?: boolean;
1337
871
  createdAt?: boolean;
1338
872
  updatedAt?: boolean;
1339
- property?: boolean | Prisma.PropertyDefaultArgs<ExtArgs>;
1340
- buyer?: boolean | Prisma.PaymentPlan$buyerArgs<ExtArgs>;
1341
- contract?: boolean | Prisma.PaymentPlan$contractArgs<ExtArgs>;
1342
- schedules?: boolean | Prisma.PaymentPlan$schedulesArgs<ExtArgs>;
1343
- payments?: boolean | Prisma.PaymentPlan$paymentsArgs<ExtArgs>;
873
+ tenant?: boolean | Prisma.PaymentPlan$tenantArgs<ExtArgs>;
874
+ methodPhases?: boolean | Prisma.PaymentPlan$methodPhasesArgs<ExtArgs>;
875
+ contractPhases?: boolean | Prisma.PaymentPlan$contractPhasesArgs<ExtArgs>;
1344
876
  _count?: boolean | Prisma.PaymentPlanCountOutputTypeDefaultArgs<ExtArgs>;
1345
877
  }, ExtArgs["result"]["paymentPlan"]>;
1346
878
  export type PaymentPlanSelectScalar = {
1347
879
  id?: boolean;
1348
- propertyId?: boolean;
1349
- buyerId?: boolean;
1350
- planType?: boolean;
880
+ tenantId?: boolean;
1351
881
  name?: boolean;
1352
882
  description?: boolean;
1353
- totalAmount?: boolean;
1354
- downPaymentAmount?: boolean;
1355
- downPaymentPaid?: boolean;
1356
- principalAmount?: boolean;
1357
- interestRate?: boolean;
1358
- totalInterest?: boolean;
1359
- state?: boolean;
1360
- stateMetadata?: boolean;
883
+ isActive?: boolean;
884
+ paymentFrequency?: boolean;
885
+ customFrequencyDays?: boolean;
886
+ numberOfInstallments?: boolean;
887
+ calculateInterestDaily?: boolean;
888
+ gracePeriodDays?: boolean;
1361
889
  createdAt?: boolean;
1362
890
  updatedAt?: boolean;
1363
891
  };
1364
- export type PaymentPlanOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "propertyId" | "buyerId" | "planType" | "name" | "description" | "totalAmount" | "downPaymentAmount" | "downPaymentPaid" | "principalAmount" | "interestRate" | "totalInterest" | "state" | "stateMetadata" | "createdAt" | "updatedAt", ExtArgs["result"]["paymentPlan"]>;
892
+ export type PaymentPlanOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "tenantId" | "name" | "description" | "isActive" | "paymentFrequency" | "customFrequencyDays" | "numberOfInstallments" | "calculateInterestDaily" | "gracePeriodDays" | "createdAt" | "updatedAt", ExtArgs["result"]["paymentPlan"]>;
1365
893
  export type PaymentPlanInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1366
- property?: boolean | Prisma.PropertyDefaultArgs<ExtArgs>;
1367
- buyer?: boolean | Prisma.PaymentPlan$buyerArgs<ExtArgs>;
1368
- contract?: boolean | Prisma.PaymentPlan$contractArgs<ExtArgs>;
1369
- schedules?: boolean | Prisma.PaymentPlan$schedulesArgs<ExtArgs>;
1370
- payments?: boolean | Prisma.PaymentPlan$paymentsArgs<ExtArgs>;
894
+ tenant?: boolean | Prisma.PaymentPlan$tenantArgs<ExtArgs>;
895
+ methodPhases?: boolean | Prisma.PaymentPlan$methodPhasesArgs<ExtArgs>;
896
+ contractPhases?: boolean | Prisma.PaymentPlan$contractPhasesArgs<ExtArgs>;
1371
897
  _count?: boolean | Prisma.PaymentPlanCountOutputTypeDefaultArgs<ExtArgs>;
1372
898
  };
1373
899
  export type $PaymentPlanPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1374
900
  name: "PaymentPlan";
1375
901
  objects: {
1376
- property: Prisma.$PropertyPayload<ExtArgs>;
1377
- buyer: Prisma.$UserPayload<ExtArgs> | null;
1378
- contract: Prisma.$ContractPayload<ExtArgs> | null;
1379
- schedules: Prisma.$PaymentSchedulePayload<ExtArgs>[];
1380
- payments: Prisma.$PaymentPayload<ExtArgs>[];
902
+ tenant: Prisma.$TenantPayload<ExtArgs> | null;
903
+ methodPhases: Prisma.$PropertyPaymentMethodPhasePayload<ExtArgs>[];
904
+ contractPhases: Prisma.$ContractPhasePayload<ExtArgs>[];
1381
905
  };
1382
906
  scalars: runtime.Types.Extensions.GetPayloadResult<{
1383
907
  id: string;
1384
- propertyId: string;
1385
- buyerId: string | null;
1386
- planType: string;
908
+ tenantId: string | null;
1387
909
  name: string;
1388
910
  description: string | null;
1389
- totalAmount: number;
1390
- downPaymentAmount: number;
1391
- downPaymentPaid: number;
1392
- principalAmount: number;
1393
- interestRate: number;
1394
- totalInterest: number;
1395
- state: string;
1396
- stateMetadata: string | null;
911
+ isActive: boolean;
912
+ paymentFrequency: string;
913
+ customFrequencyDays: number | null;
914
+ numberOfInstallments: number;
915
+ calculateInterestDaily: boolean;
916
+ gracePeriodDays: number;
1397
917
  createdAt: Date;
1398
918
  updatedAt: Date;
1399
919
  }, ExtArgs["result"]["paymentPlan"]>;
@@ -1673,11 +1193,9 @@ export interface PaymentPlanDelegate<ExtArgs extends runtime.Types.Extensions.In
1673
1193
  */
1674
1194
  export interface Prisma__PaymentPlanClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
1675
1195
  readonly [Symbol.toStringTag]: "PrismaPromise";
1676
- 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>;
1677
- buyer<T extends Prisma.PaymentPlan$buyerArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.PaymentPlan$buyerArgs<ExtArgs>>): Prisma.Prisma__UserClient<runtime.Types.Result.GetResult<Prisma.$UserPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>;
1678
- contract<T extends Prisma.PaymentPlan$contractArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.PaymentPlan$contractArgs<ExtArgs>>): Prisma.Prisma__ContractClient<runtime.Types.Result.GetResult<Prisma.$ContractPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>;
1679
- schedules<T extends Prisma.PaymentPlan$schedulesArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.PaymentPlan$schedulesArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$PaymentSchedulePayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>;
1680
- payments<T extends Prisma.PaymentPlan$paymentsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.PaymentPlan$paymentsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$PaymentPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>;
1196
+ tenant<T extends Prisma.PaymentPlan$tenantArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.PaymentPlan$tenantArgs<ExtArgs>>): Prisma.Prisma__TenantClient<runtime.Types.Result.GetResult<Prisma.$TenantPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>;
1197
+ methodPhases<T extends Prisma.PaymentPlan$methodPhasesArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.PaymentPlan$methodPhasesArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$PropertyPaymentMethodPhasePayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>;
1198
+ contractPhases<T extends Prisma.PaymentPlan$contractPhasesArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.PaymentPlan$contractPhasesArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$ContractPhasePayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>;
1681
1199
  /**
1682
1200
  * Attaches callbacks for the resolution and/or rejection of the Promise.
1683
1201
  * @param onfulfilled The callback to execute when the Promise is resolved.
@@ -1704,19 +1222,15 @@ export interface Prisma__PaymentPlanClient<T, Null = never, ExtArgs extends runt
1704
1222
  */
1705
1223
  export interface PaymentPlanFieldRefs {
1706
1224
  readonly id: Prisma.FieldRef<"PaymentPlan", 'String'>;
1707
- readonly propertyId: Prisma.FieldRef<"PaymentPlan", 'String'>;
1708
- readonly buyerId: Prisma.FieldRef<"PaymentPlan", 'String'>;
1709
- readonly planType: Prisma.FieldRef<"PaymentPlan", 'String'>;
1225
+ readonly tenantId: Prisma.FieldRef<"PaymentPlan", 'String'>;
1710
1226
  readonly name: Prisma.FieldRef<"PaymentPlan", 'String'>;
1711
1227
  readonly description: Prisma.FieldRef<"PaymentPlan", 'String'>;
1712
- readonly totalAmount: Prisma.FieldRef<"PaymentPlan", 'Float'>;
1713
- readonly downPaymentAmount: Prisma.FieldRef<"PaymentPlan", 'Float'>;
1714
- readonly downPaymentPaid: Prisma.FieldRef<"PaymentPlan", 'Float'>;
1715
- readonly principalAmount: Prisma.FieldRef<"PaymentPlan", 'Float'>;
1716
- readonly interestRate: Prisma.FieldRef<"PaymentPlan", 'Float'>;
1717
- readonly totalInterest: Prisma.FieldRef<"PaymentPlan", 'Float'>;
1718
- readonly state: Prisma.FieldRef<"PaymentPlan", 'String'>;
1719
- readonly stateMetadata: Prisma.FieldRef<"PaymentPlan", 'String'>;
1228
+ readonly isActive: Prisma.FieldRef<"PaymentPlan", 'Boolean'>;
1229
+ readonly paymentFrequency: Prisma.FieldRef<"PaymentPlan", 'String'>;
1230
+ readonly customFrequencyDays: Prisma.FieldRef<"PaymentPlan", 'Int'>;
1231
+ readonly numberOfInstallments: Prisma.FieldRef<"PaymentPlan", 'Int'>;
1232
+ readonly calculateInterestDaily: Prisma.FieldRef<"PaymentPlan", 'Boolean'>;
1233
+ readonly gracePeriodDays: Prisma.FieldRef<"PaymentPlan", 'Int'>;
1720
1234
  readonly createdAt: Prisma.FieldRef<"PaymentPlan", 'DateTime'>;
1721
1235
  readonly updatedAt: Prisma.FieldRef<"PaymentPlan", 'DateTime'>;
1722
1236
  }
@@ -2047,86 +1561,68 @@ export type PaymentPlanDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.I
2047
1561
  limit?: number;
2048
1562
  };
2049
1563
  /**
2050
- * PaymentPlan.buyer
2051
- */
2052
- export type PaymentPlan$buyerArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
2053
- /**
2054
- * Select specific fields to fetch from the User
2055
- */
2056
- select?: Prisma.UserSelect<ExtArgs> | null;
2057
- /**
2058
- * Omit specific fields from the User
2059
- */
2060
- omit?: Prisma.UserOmit<ExtArgs> | null;
2061
- /**
2062
- * Choose, which related nodes to fetch as well
2063
- */
2064
- include?: Prisma.UserInclude<ExtArgs> | null;
2065
- where?: Prisma.UserWhereInput;
2066
- };
2067
- /**
2068
- * PaymentPlan.contract
1564
+ * PaymentPlan.tenant
2069
1565
  */
2070
- export type PaymentPlan$contractArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1566
+ export type PaymentPlan$tenantArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
2071
1567
  /**
2072
- * Select specific fields to fetch from the Contract
1568
+ * Select specific fields to fetch from the Tenant
2073
1569
  */
2074
- select?: Prisma.ContractSelect<ExtArgs> | null;
1570
+ select?: Prisma.TenantSelect<ExtArgs> | null;
2075
1571
  /**
2076
- * Omit specific fields from the Contract
1572
+ * Omit specific fields from the Tenant
2077
1573
  */
2078
- omit?: Prisma.ContractOmit<ExtArgs> | null;
1574
+ omit?: Prisma.TenantOmit<ExtArgs> | null;
2079
1575
  /**
2080
1576
  * Choose, which related nodes to fetch as well
2081
1577
  */
2082
- include?: Prisma.ContractInclude<ExtArgs> | null;
2083
- where?: Prisma.ContractWhereInput;
1578
+ include?: Prisma.TenantInclude<ExtArgs> | null;
1579
+ where?: Prisma.TenantWhereInput;
2084
1580
  };
2085
1581
  /**
2086
- * PaymentPlan.schedules
1582
+ * PaymentPlan.methodPhases
2087
1583
  */
2088
- export type PaymentPlan$schedulesArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1584
+ export type PaymentPlan$methodPhasesArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
2089
1585
  /**
2090
- * Select specific fields to fetch from the PaymentSchedule
1586
+ * Select specific fields to fetch from the PropertyPaymentMethodPhase
2091
1587
  */
2092
- select?: Prisma.PaymentScheduleSelect<ExtArgs> | null;
1588
+ select?: Prisma.PropertyPaymentMethodPhaseSelect<ExtArgs> | null;
2093
1589
  /**
2094
- * Omit specific fields from the PaymentSchedule
1590
+ * Omit specific fields from the PropertyPaymentMethodPhase
2095
1591
  */
2096
- omit?: Prisma.PaymentScheduleOmit<ExtArgs> | null;
1592
+ omit?: Prisma.PropertyPaymentMethodPhaseOmit<ExtArgs> | null;
2097
1593
  /**
2098
1594
  * Choose, which related nodes to fetch as well
2099
1595
  */
2100
- include?: Prisma.PaymentScheduleInclude<ExtArgs> | null;
2101
- where?: Prisma.PaymentScheduleWhereInput;
2102
- orderBy?: Prisma.PaymentScheduleOrderByWithRelationInput | Prisma.PaymentScheduleOrderByWithRelationInput[];
2103
- cursor?: Prisma.PaymentScheduleWhereUniqueInput;
1596
+ include?: Prisma.PropertyPaymentMethodPhaseInclude<ExtArgs> | null;
1597
+ where?: Prisma.PropertyPaymentMethodPhaseWhereInput;
1598
+ orderBy?: Prisma.PropertyPaymentMethodPhaseOrderByWithRelationInput | Prisma.PropertyPaymentMethodPhaseOrderByWithRelationInput[];
1599
+ cursor?: Prisma.PropertyPaymentMethodPhaseWhereUniqueInput;
2104
1600
  take?: number;
2105
1601
  skip?: number;
2106
- distinct?: Prisma.PaymentScheduleScalarFieldEnum | Prisma.PaymentScheduleScalarFieldEnum[];
1602
+ distinct?: Prisma.PropertyPaymentMethodPhaseScalarFieldEnum | Prisma.PropertyPaymentMethodPhaseScalarFieldEnum[];
2107
1603
  };
2108
1604
  /**
2109
- * PaymentPlan.payments
1605
+ * PaymentPlan.contractPhases
2110
1606
  */
2111
- export type PaymentPlan$paymentsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1607
+ export type PaymentPlan$contractPhasesArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
2112
1608
  /**
2113
- * Select specific fields to fetch from the Payment
1609
+ * Select specific fields to fetch from the ContractPhase
2114
1610
  */
2115
- select?: Prisma.PaymentSelect<ExtArgs> | null;
1611
+ select?: Prisma.ContractPhaseSelect<ExtArgs> | null;
2116
1612
  /**
2117
- * Omit specific fields from the Payment
1613
+ * Omit specific fields from the ContractPhase
2118
1614
  */
2119
- omit?: Prisma.PaymentOmit<ExtArgs> | null;
1615
+ omit?: Prisma.ContractPhaseOmit<ExtArgs> | null;
2120
1616
  /**
2121
1617
  * Choose, which related nodes to fetch as well
2122
1618
  */
2123
- include?: Prisma.PaymentInclude<ExtArgs> | null;
2124
- where?: Prisma.PaymentWhereInput;
2125
- orderBy?: Prisma.PaymentOrderByWithRelationInput | Prisma.PaymentOrderByWithRelationInput[];
2126
- cursor?: Prisma.PaymentWhereUniqueInput;
1619
+ include?: Prisma.ContractPhaseInclude<ExtArgs> | null;
1620
+ where?: Prisma.ContractPhaseWhereInput;
1621
+ orderBy?: Prisma.ContractPhaseOrderByWithRelationInput | Prisma.ContractPhaseOrderByWithRelationInput[];
1622
+ cursor?: Prisma.ContractPhaseWhereUniqueInput;
2127
1623
  take?: number;
2128
1624
  skip?: number;
2129
- distinct?: Prisma.PaymentScalarFieldEnum | Prisma.PaymentScalarFieldEnum[];
1625
+ distinct?: Prisma.ContractPhaseScalarFieldEnum | Prisma.ContractPhaseScalarFieldEnum[];
2130
1626
  };
2131
1627
  /**
2132
1628
  * PaymentPlan without action