@valentine-efagene/qshelter-common 2.0.19 → 2.0.22

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 (52) 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 +1050 -720
  7. package/dist/generated/client/internal/prismaNamespace.js +313 -190
  8. package/dist/generated/client/internal/prismaNamespaceBrowser.d.ts +344 -215
  9. package/dist/generated/client/internal/prismaNamespaceBrowser.js +313 -190
  10. package/dist/generated/client/models/Amenity.d.ts +168 -1
  11. package/dist/generated/client/models/Contract.d.ts +2037 -298
  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 +325 -1062
  30. package/dist/generated/client/models/Property.d.ts +154 -684
  31. package/dist/generated/client/models/PropertyPaymentMethod.d.ts +1498 -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/User.d.ts +684 -427
  46. package/dist/generated/client/models/index.d.ts +15 -12
  47. package/dist/generated/client/models/index.js +15 -12
  48. package/dist/generated/client/models.d.ts +15 -12
  49. package/dist/src/config/config.service.d.ts +0 -1
  50. package/dist/src/config/config.service.js +0 -1
  51. package/package.json +2 -1
  52. package/prisma/schema.prisma +544 -269
@@ -0,0 +1,2467 @@
1
+ import type * as runtime from "@prisma/client/runtime/client";
2
+ import type * as Prisma from "../internal/prismaNamespace.js";
3
+ /**
4
+ * Model ContractPhase
5
+ *
6
+ */
7
+ export type ContractPhaseModel = runtime.Types.Result.DefaultSelection<Prisma.$ContractPhasePayload>;
8
+ export type AggregateContractPhase = {
9
+ _count: ContractPhaseCountAggregateOutputType | null;
10
+ _avg: ContractPhaseAvgAggregateOutputType | null;
11
+ _sum: ContractPhaseSumAggregateOutputType | null;
12
+ _min: ContractPhaseMinAggregateOutputType | null;
13
+ _max: ContractPhaseMaxAggregateOutputType | null;
14
+ };
15
+ export type ContractPhaseAvgAggregateOutputType = {
16
+ order: number | null;
17
+ totalAmount: number | null;
18
+ paidAmount: number | null;
19
+ remainingAmount: number | null;
20
+ interestRate: number | null;
21
+ minimumCompletionPercentage: number | null;
22
+ };
23
+ export type ContractPhaseSumAggregateOutputType = {
24
+ order: number | null;
25
+ totalAmount: number | null;
26
+ paidAmount: number | null;
27
+ remainingAmount: number | null;
28
+ interestRate: number | null;
29
+ minimumCompletionPercentage: number | null;
30
+ };
31
+ export type ContractPhaseMinAggregateOutputType = {
32
+ id: string | null;
33
+ contractId: string | null;
34
+ paymentPlanId: string | null;
35
+ name: string | null;
36
+ description: string | null;
37
+ phaseCategory: string | null;
38
+ phaseType: string | null;
39
+ order: number | null;
40
+ status: string | null;
41
+ totalAmount: number | null;
42
+ paidAmount: number | null;
43
+ remainingAmount: number | null;
44
+ interestRate: number | null;
45
+ dueDate: Date | null;
46
+ startDate: Date | null;
47
+ endDate: Date | null;
48
+ activatedAt: Date | null;
49
+ completedAt: Date | null;
50
+ requiresPreviousPhaseCompletion: boolean | null;
51
+ minimumCompletionPercentage: number | null;
52
+ createdAt: Date | null;
53
+ updatedAt: Date | null;
54
+ };
55
+ export type ContractPhaseMaxAggregateOutputType = {
56
+ id: string | null;
57
+ contractId: string | null;
58
+ paymentPlanId: string | null;
59
+ name: string | null;
60
+ description: string | null;
61
+ phaseCategory: string | null;
62
+ phaseType: string | null;
63
+ order: number | null;
64
+ status: string | null;
65
+ totalAmount: number | null;
66
+ paidAmount: number | null;
67
+ remainingAmount: number | null;
68
+ interestRate: number | null;
69
+ dueDate: Date | null;
70
+ startDate: Date | null;
71
+ endDate: Date | null;
72
+ activatedAt: Date | null;
73
+ completedAt: Date | null;
74
+ requiresPreviousPhaseCompletion: boolean | null;
75
+ minimumCompletionPercentage: number | null;
76
+ createdAt: Date | null;
77
+ updatedAt: Date | null;
78
+ };
79
+ export type ContractPhaseCountAggregateOutputType = {
80
+ id: number;
81
+ contractId: number;
82
+ paymentPlanId: number;
83
+ name: number;
84
+ description: number;
85
+ phaseCategory: number;
86
+ phaseType: number;
87
+ order: number;
88
+ status: number;
89
+ totalAmount: number;
90
+ paidAmount: number;
91
+ remainingAmount: number;
92
+ interestRate: number;
93
+ dueDate: number;
94
+ startDate: number;
95
+ endDate: number;
96
+ activatedAt: number;
97
+ completedAt: number;
98
+ requiresPreviousPhaseCompletion: number;
99
+ minimumCompletionPercentage: number;
100
+ createdAt: number;
101
+ updatedAt: number;
102
+ _all: number;
103
+ };
104
+ export type ContractPhaseAvgAggregateInputType = {
105
+ order?: true;
106
+ totalAmount?: true;
107
+ paidAmount?: true;
108
+ remainingAmount?: true;
109
+ interestRate?: true;
110
+ minimumCompletionPercentage?: true;
111
+ };
112
+ export type ContractPhaseSumAggregateInputType = {
113
+ order?: true;
114
+ totalAmount?: true;
115
+ paidAmount?: true;
116
+ remainingAmount?: true;
117
+ interestRate?: true;
118
+ minimumCompletionPercentage?: true;
119
+ };
120
+ export type ContractPhaseMinAggregateInputType = {
121
+ id?: true;
122
+ contractId?: true;
123
+ paymentPlanId?: true;
124
+ name?: true;
125
+ description?: true;
126
+ phaseCategory?: true;
127
+ phaseType?: true;
128
+ order?: true;
129
+ status?: true;
130
+ totalAmount?: true;
131
+ paidAmount?: true;
132
+ remainingAmount?: true;
133
+ interestRate?: true;
134
+ dueDate?: true;
135
+ startDate?: true;
136
+ endDate?: true;
137
+ activatedAt?: true;
138
+ completedAt?: true;
139
+ requiresPreviousPhaseCompletion?: true;
140
+ minimumCompletionPercentage?: true;
141
+ createdAt?: true;
142
+ updatedAt?: true;
143
+ };
144
+ export type ContractPhaseMaxAggregateInputType = {
145
+ id?: true;
146
+ contractId?: true;
147
+ paymentPlanId?: true;
148
+ name?: true;
149
+ description?: true;
150
+ phaseCategory?: true;
151
+ phaseType?: true;
152
+ order?: true;
153
+ status?: true;
154
+ totalAmount?: true;
155
+ paidAmount?: true;
156
+ remainingAmount?: true;
157
+ interestRate?: true;
158
+ dueDate?: true;
159
+ startDate?: true;
160
+ endDate?: true;
161
+ activatedAt?: true;
162
+ completedAt?: true;
163
+ requiresPreviousPhaseCompletion?: true;
164
+ minimumCompletionPercentage?: true;
165
+ createdAt?: true;
166
+ updatedAt?: true;
167
+ };
168
+ export type ContractPhaseCountAggregateInputType = {
169
+ id?: true;
170
+ contractId?: true;
171
+ paymentPlanId?: true;
172
+ name?: true;
173
+ description?: true;
174
+ phaseCategory?: true;
175
+ phaseType?: true;
176
+ order?: true;
177
+ status?: true;
178
+ totalAmount?: true;
179
+ paidAmount?: true;
180
+ remainingAmount?: true;
181
+ interestRate?: true;
182
+ dueDate?: true;
183
+ startDate?: true;
184
+ endDate?: true;
185
+ activatedAt?: true;
186
+ completedAt?: true;
187
+ requiresPreviousPhaseCompletion?: true;
188
+ minimumCompletionPercentage?: true;
189
+ createdAt?: true;
190
+ updatedAt?: true;
191
+ _all?: true;
192
+ };
193
+ export type ContractPhaseAggregateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
194
+ /**
195
+ * Filter which ContractPhase to aggregate.
196
+ */
197
+ where?: Prisma.ContractPhaseWhereInput;
198
+ /**
199
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
200
+ *
201
+ * Determine the order of ContractPhases to fetch.
202
+ */
203
+ orderBy?: Prisma.ContractPhaseOrderByWithRelationInput | Prisma.ContractPhaseOrderByWithRelationInput[];
204
+ /**
205
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
206
+ *
207
+ * Sets the start position
208
+ */
209
+ cursor?: Prisma.ContractPhaseWhereUniqueInput;
210
+ /**
211
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
212
+ *
213
+ * Take `±n` ContractPhases from the position of the cursor.
214
+ */
215
+ take?: number;
216
+ /**
217
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
218
+ *
219
+ * Skip the first `n` ContractPhases.
220
+ */
221
+ skip?: number;
222
+ /**
223
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
224
+ *
225
+ * Count returned ContractPhases
226
+ **/
227
+ _count?: true | ContractPhaseCountAggregateInputType;
228
+ /**
229
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
230
+ *
231
+ * Select which fields to average
232
+ **/
233
+ _avg?: ContractPhaseAvgAggregateInputType;
234
+ /**
235
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
236
+ *
237
+ * Select which fields to sum
238
+ **/
239
+ _sum?: ContractPhaseSumAggregateInputType;
240
+ /**
241
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
242
+ *
243
+ * Select which fields to find the minimum value
244
+ **/
245
+ _min?: ContractPhaseMinAggregateInputType;
246
+ /**
247
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
248
+ *
249
+ * Select which fields to find the maximum value
250
+ **/
251
+ _max?: ContractPhaseMaxAggregateInputType;
252
+ };
253
+ export type GetContractPhaseAggregateType<T extends ContractPhaseAggregateArgs> = {
254
+ [P in keyof T & keyof AggregateContractPhase]: P extends '_count' | 'count' ? T[P] extends true ? number : Prisma.GetScalarType<T[P], AggregateContractPhase[P]> : Prisma.GetScalarType<T[P], AggregateContractPhase[P]>;
255
+ };
256
+ export type ContractPhaseGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
257
+ where?: Prisma.ContractPhaseWhereInput;
258
+ orderBy?: Prisma.ContractPhaseOrderByWithAggregationInput | Prisma.ContractPhaseOrderByWithAggregationInput[];
259
+ by: Prisma.ContractPhaseScalarFieldEnum[] | Prisma.ContractPhaseScalarFieldEnum;
260
+ having?: Prisma.ContractPhaseScalarWhereWithAggregatesInput;
261
+ take?: number;
262
+ skip?: number;
263
+ _count?: ContractPhaseCountAggregateInputType | true;
264
+ _avg?: ContractPhaseAvgAggregateInputType;
265
+ _sum?: ContractPhaseSumAggregateInputType;
266
+ _min?: ContractPhaseMinAggregateInputType;
267
+ _max?: ContractPhaseMaxAggregateInputType;
268
+ };
269
+ export type ContractPhaseGroupByOutputType = {
270
+ id: string;
271
+ contractId: string;
272
+ paymentPlanId: string | null;
273
+ name: string;
274
+ description: string | null;
275
+ phaseCategory: string;
276
+ phaseType: string;
277
+ order: number;
278
+ status: string;
279
+ totalAmount: number | null;
280
+ paidAmount: number;
281
+ remainingAmount: number | null;
282
+ interestRate: number | null;
283
+ dueDate: Date | null;
284
+ startDate: Date | null;
285
+ endDate: Date | null;
286
+ activatedAt: Date | null;
287
+ completedAt: Date | null;
288
+ requiresPreviousPhaseCompletion: boolean;
289
+ minimumCompletionPercentage: number | null;
290
+ createdAt: Date;
291
+ updatedAt: Date;
292
+ _count: ContractPhaseCountAggregateOutputType | null;
293
+ _avg: ContractPhaseAvgAggregateOutputType | null;
294
+ _sum: ContractPhaseSumAggregateOutputType | null;
295
+ _min: ContractPhaseMinAggregateOutputType | null;
296
+ _max: ContractPhaseMaxAggregateOutputType | null;
297
+ };
298
+ type GetContractPhaseGroupByPayload<T extends ContractPhaseGroupByArgs> = Prisma.PrismaPromise<Array<Prisma.PickEnumerable<ContractPhaseGroupByOutputType, T['by']> & {
299
+ [P in ((keyof T) & (keyof ContractPhaseGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number : Prisma.GetScalarType<T[P], ContractPhaseGroupByOutputType[P]> : Prisma.GetScalarType<T[P], ContractPhaseGroupByOutputType[P]>;
300
+ }>>;
301
+ export type ContractPhaseWhereInput = {
302
+ AND?: Prisma.ContractPhaseWhereInput | Prisma.ContractPhaseWhereInput[];
303
+ OR?: Prisma.ContractPhaseWhereInput[];
304
+ NOT?: Prisma.ContractPhaseWhereInput | Prisma.ContractPhaseWhereInput[];
305
+ id?: Prisma.StringFilter<"ContractPhase"> | string;
306
+ contractId?: Prisma.StringFilter<"ContractPhase"> | string;
307
+ paymentPlanId?: Prisma.StringNullableFilter<"ContractPhase"> | string | null;
308
+ name?: Prisma.StringFilter<"ContractPhase"> | string;
309
+ description?: Prisma.StringNullableFilter<"ContractPhase"> | string | null;
310
+ phaseCategory?: Prisma.StringFilter<"ContractPhase"> | string;
311
+ phaseType?: Prisma.StringFilter<"ContractPhase"> | string;
312
+ order?: Prisma.IntFilter<"ContractPhase"> | number;
313
+ status?: Prisma.StringFilter<"ContractPhase"> | string;
314
+ totalAmount?: Prisma.FloatNullableFilter<"ContractPhase"> | number | null;
315
+ paidAmount?: Prisma.FloatFilter<"ContractPhase"> | number;
316
+ remainingAmount?: Prisma.FloatNullableFilter<"ContractPhase"> | number | null;
317
+ interestRate?: Prisma.FloatNullableFilter<"ContractPhase"> | number | null;
318
+ dueDate?: Prisma.DateTimeNullableFilter<"ContractPhase"> | Date | string | null;
319
+ startDate?: Prisma.DateTimeNullableFilter<"ContractPhase"> | Date | string | null;
320
+ endDate?: Prisma.DateTimeNullableFilter<"ContractPhase"> | Date | string | null;
321
+ activatedAt?: Prisma.DateTimeNullableFilter<"ContractPhase"> | Date | string | null;
322
+ completedAt?: Prisma.DateTimeNullableFilter<"ContractPhase"> | Date | string | null;
323
+ requiresPreviousPhaseCompletion?: Prisma.BoolFilter<"ContractPhase"> | boolean;
324
+ minimumCompletionPercentage?: Prisma.FloatNullableFilter<"ContractPhase"> | number | null;
325
+ createdAt?: Prisma.DateTimeFilter<"ContractPhase"> | Date | string;
326
+ updatedAt?: Prisma.DateTimeFilter<"ContractPhase"> | Date | string;
327
+ contract?: Prisma.XOR<Prisma.ContractScalarRelationFilter, Prisma.ContractWhereInput>;
328
+ paymentPlan?: Prisma.XOR<Prisma.PaymentPlanNullableScalarRelationFilter, Prisma.PaymentPlanWhereInput> | null;
329
+ installments?: Prisma.ContractInstallmentListRelationFilter;
330
+ payments?: Prisma.ContractPaymentListRelationFilter;
331
+ steps?: Prisma.ContractPhaseStepListRelationFilter;
332
+ };
333
+ export type ContractPhaseOrderByWithRelationInput = {
334
+ id?: Prisma.SortOrder;
335
+ contractId?: Prisma.SortOrder;
336
+ paymentPlanId?: Prisma.SortOrderInput | Prisma.SortOrder;
337
+ name?: Prisma.SortOrder;
338
+ description?: Prisma.SortOrderInput | Prisma.SortOrder;
339
+ phaseCategory?: Prisma.SortOrder;
340
+ phaseType?: Prisma.SortOrder;
341
+ order?: Prisma.SortOrder;
342
+ status?: Prisma.SortOrder;
343
+ totalAmount?: Prisma.SortOrderInput | Prisma.SortOrder;
344
+ paidAmount?: Prisma.SortOrder;
345
+ remainingAmount?: Prisma.SortOrderInput | Prisma.SortOrder;
346
+ interestRate?: Prisma.SortOrderInput | Prisma.SortOrder;
347
+ dueDate?: Prisma.SortOrderInput | Prisma.SortOrder;
348
+ startDate?: Prisma.SortOrderInput | Prisma.SortOrder;
349
+ endDate?: Prisma.SortOrderInput | Prisma.SortOrder;
350
+ activatedAt?: Prisma.SortOrderInput | Prisma.SortOrder;
351
+ completedAt?: Prisma.SortOrderInput | Prisma.SortOrder;
352
+ requiresPreviousPhaseCompletion?: Prisma.SortOrder;
353
+ minimumCompletionPercentage?: Prisma.SortOrderInput | Prisma.SortOrder;
354
+ createdAt?: Prisma.SortOrder;
355
+ updatedAt?: Prisma.SortOrder;
356
+ contract?: Prisma.ContractOrderByWithRelationInput;
357
+ paymentPlan?: Prisma.PaymentPlanOrderByWithRelationInput;
358
+ installments?: Prisma.ContractInstallmentOrderByRelationAggregateInput;
359
+ payments?: Prisma.ContractPaymentOrderByRelationAggregateInput;
360
+ steps?: Prisma.ContractPhaseStepOrderByRelationAggregateInput;
361
+ _relevance?: Prisma.ContractPhaseOrderByRelevanceInput;
362
+ };
363
+ export type ContractPhaseWhereUniqueInput = Prisma.AtLeast<{
364
+ id?: string;
365
+ AND?: Prisma.ContractPhaseWhereInput | Prisma.ContractPhaseWhereInput[];
366
+ OR?: Prisma.ContractPhaseWhereInput[];
367
+ NOT?: Prisma.ContractPhaseWhereInput | Prisma.ContractPhaseWhereInput[];
368
+ contractId?: Prisma.StringFilter<"ContractPhase"> | string;
369
+ paymentPlanId?: Prisma.StringNullableFilter<"ContractPhase"> | string | null;
370
+ name?: Prisma.StringFilter<"ContractPhase"> | string;
371
+ description?: Prisma.StringNullableFilter<"ContractPhase"> | string | null;
372
+ phaseCategory?: Prisma.StringFilter<"ContractPhase"> | string;
373
+ phaseType?: Prisma.StringFilter<"ContractPhase"> | string;
374
+ order?: Prisma.IntFilter<"ContractPhase"> | number;
375
+ status?: Prisma.StringFilter<"ContractPhase"> | string;
376
+ totalAmount?: Prisma.FloatNullableFilter<"ContractPhase"> | number | null;
377
+ paidAmount?: Prisma.FloatFilter<"ContractPhase"> | number;
378
+ remainingAmount?: Prisma.FloatNullableFilter<"ContractPhase"> | number | null;
379
+ interestRate?: Prisma.FloatNullableFilter<"ContractPhase"> | number | null;
380
+ dueDate?: Prisma.DateTimeNullableFilter<"ContractPhase"> | Date | string | null;
381
+ startDate?: Prisma.DateTimeNullableFilter<"ContractPhase"> | Date | string | null;
382
+ endDate?: Prisma.DateTimeNullableFilter<"ContractPhase"> | Date | string | null;
383
+ activatedAt?: Prisma.DateTimeNullableFilter<"ContractPhase"> | Date | string | null;
384
+ completedAt?: Prisma.DateTimeNullableFilter<"ContractPhase"> | Date | string | null;
385
+ requiresPreviousPhaseCompletion?: Prisma.BoolFilter<"ContractPhase"> | boolean;
386
+ minimumCompletionPercentage?: Prisma.FloatNullableFilter<"ContractPhase"> | number | null;
387
+ createdAt?: Prisma.DateTimeFilter<"ContractPhase"> | Date | string;
388
+ updatedAt?: Prisma.DateTimeFilter<"ContractPhase"> | Date | string;
389
+ contract?: Prisma.XOR<Prisma.ContractScalarRelationFilter, Prisma.ContractWhereInput>;
390
+ paymentPlan?: Prisma.XOR<Prisma.PaymentPlanNullableScalarRelationFilter, Prisma.PaymentPlanWhereInput> | null;
391
+ installments?: Prisma.ContractInstallmentListRelationFilter;
392
+ payments?: Prisma.ContractPaymentListRelationFilter;
393
+ steps?: Prisma.ContractPhaseStepListRelationFilter;
394
+ }, "id">;
395
+ export type ContractPhaseOrderByWithAggregationInput = {
396
+ id?: Prisma.SortOrder;
397
+ contractId?: Prisma.SortOrder;
398
+ paymentPlanId?: Prisma.SortOrderInput | Prisma.SortOrder;
399
+ name?: Prisma.SortOrder;
400
+ description?: Prisma.SortOrderInput | Prisma.SortOrder;
401
+ phaseCategory?: Prisma.SortOrder;
402
+ phaseType?: Prisma.SortOrder;
403
+ order?: Prisma.SortOrder;
404
+ status?: Prisma.SortOrder;
405
+ totalAmount?: Prisma.SortOrderInput | Prisma.SortOrder;
406
+ paidAmount?: Prisma.SortOrder;
407
+ remainingAmount?: Prisma.SortOrderInput | Prisma.SortOrder;
408
+ interestRate?: Prisma.SortOrderInput | Prisma.SortOrder;
409
+ dueDate?: Prisma.SortOrderInput | Prisma.SortOrder;
410
+ startDate?: Prisma.SortOrderInput | Prisma.SortOrder;
411
+ endDate?: Prisma.SortOrderInput | Prisma.SortOrder;
412
+ activatedAt?: Prisma.SortOrderInput | Prisma.SortOrder;
413
+ completedAt?: Prisma.SortOrderInput | Prisma.SortOrder;
414
+ requiresPreviousPhaseCompletion?: Prisma.SortOrder;
415
+ minimumCompletionPercentage?: Prisma.SortOrderInput | Prisma.SortOrder;
416
+ createdAt?: Prisma.SortOrder;
417
+ updatedAt?: Prisma.SortOrder;
418
+ _count?: Prisma.ContractPhaseCountOrderByAggregateInput;
419
+ _avg?: Prisma.ContractPhaseAvgOrderByAggregateInput;
420
+ _max?: Prisma.ContractPhaseMaxOrderByAggregateInput;
421
+ _min?: Prisma.ContractPhaseMinOrderByAggregateInput;
422
+ _sum?: Prisma.ContractPhaseSumOrderByAggregateInput;
423
+ };
424
+ export type ContractPhaseScalarWhereWithAggregatesInput = {
425
+ AND?: Prisma.ContractPhaseScalarWhereWithAggregatesInput | Prisma.ContractPhaseScalarWhereWithAggregatesInput[];
426
+ OR?: Prisma.ContractPhaseScalarWhereWithAggregatesInput[];
427
+ NOT?: Prisma.ContractPhaseScalarWhereWithAggregatesInput | Prisma.ContractPhaseScalarWhereWithAggregatesInput[];
428
+ id?: Prisma.StringWithAggregatesFilter<"ContractPhase"> | string;
429
+ contractId?: Prisma.StringWithAggregatesFilter<"ContractPhase"> | string;
430
+ paymentPlanId?: Prisma.StringNullableWithAggregatesFilter<"ContractPhase"> | string | null;
431
+ name?: Prisma.StringWithAggregatesFilter<"ContractPhase"> | string;
432
+ description?: Prisma.StringNullableWithAggregatesFilter<"ContractPhase"> | string | null;
433
+ phaseCategory?: Prisma.StringWithAggregatesFilter<"ContractPhase"> | string;
434
+ phaseType?: Prisma.StringWithAggregatesFilter<"ContractPhase"> | string;
435
+ order?: Prisma.IntWithAggregatesFilter<"ContractPhase"> | number;
436
+ status?: Prisma.StringWithAggregatesFilter<"ContractPhase"> | string;
437
+ totalAmount?: Prisma.FloatNullableWithAggregatesFilter<"ContractPhase"> | number | null;
438
+ paidAmount?: Prisma.FloatWithAggregatesFilter<"ContractPhase"> | number;
439
+ remainingAmount?: Prisma.FloatNullableWithAggregatesFilter<"ContractPhase"> | number | null;
440
+ interestRate?: Prisma.FloatNullableWithAggregatesFilter<"ContractPhase"> | number | null;
441
+ dueDate?: Prisma.DateTimeNullableWithAggregatesFilter<"ContractPhase"> | Date | string | null;
442
+ startDate?: Prisma.DateTimeNullableWithAggregatesFilter<"ContractPhase"> | Date | string | null;
443
+ endDate?: Prisma.DateTimeNullableWithAggregatesFilter<"ContractPhase"> | Date | string | null;
444
+ activatedAt?: Prisma.DateTimeNullableWithAggregatesFilter<"ContractPhase"> | Date | string | null;
445
+ completedAt?: Prisma.DateTimeNullableWithAggregatesFilter<"ContractPhase"> | Date | string | null;
446
+ requiresPreviousPhaseCompletion?: Prisma.BoolWithAggregatesFilter<"ContractPhase"> | boolean;
447
+ minimumCompletionPercentage?: Prisma.FloatNullableWithAggregatesFilter<"ContractPhase"> | number | null;
448
+ createdAt?: Prisma.DateTimeWithAggregatesFilter<"ContractPhase"> | Date | string;
449
+ updatedAt?: Prisma.DateTimeWithAggregatesFilter<"ContractPhase"> | Date | string;
450
+ };
451
+ export type ContractPhaseCreateInput = {
452
+ id?: string;
453
+ name: string;
454
+ description?: string | null;
455
+ phaseCategory: string;
456
+ phaseType: string;
457
+ order: number;
458
+ status?: string;
459
+ totalAmount?: number | null;
460
+ paidAmount?: number;
461
+ remainingAmount?: number | null;
462
+ interestRate?: number | null;
463
+ dueDate?: Date | string | null;
464
+ startDate?: Date | string | null;
465
+ endDate?: Date | string | null;
466
+ activatedAt?: Date | string | null;
467
+ completedAt?: Date | string | null;
468
+ requiresPreviousPhaseCompletion?: boolean;
469
+ minimumCompletionPercentage?: number | null;
470
+ createdAt?: Date | string;
471
+ updatedAt?: Date | string;
472
+ contract: Prisma.ContractCreateNestedOneWithoutPhasesInput;
473
+ paymentPlan?: Prisma.PaymentPlanCreateNestedOneWithoutContractPhasesInput;
474
+ installments?: Prisma.ContractInstallmentCreateNestedManyWithoutPhaseInput;
475
+ payments?: Prisma.ContractPaymentCreateNestedManyWithoutPhaseInput;
476
+ steps?: Prisma.ContractPhaseStepCreateNestedManyWithoutPhaseInput;
477
+ };
478
+ export type ContractPhaseUncheckedCreateInput = {
479
+ id?: string;
480
+ contractId: string;
481
+ paymentPlanId?: string | null;
482
+ name: string;
483
+ description?: string | null;
484
+ phaseCategory: string;
485
+ phaseType: string;
486
+ order: number;
487
+ status?: string;
488
+ totalAmount?: number | null;
489
+ paidAmount?: number;
490
+ remainingAmount?: number | null;
491
+ interestRate?: number | null;
492
+ dueDate?: Date | string | null;
493
+ startDate?: Date | string | null;
494
+ endDate?: Date | string | null;
495
+ activatedAt?: Date | string | null;
496
+ completedAt?: Date | string | null;
497
+ requiresPreviousPhaseCompletion?: boolean;
498
+ minimumCompletionPercentage?: number | null;
499
+ createdAt?: Date | string;
500
+ updatedAt?: Date | string;
501
+ installments?: Prisma.ContractInstallmentUncheckedCreateNestedManyWithoutPhaseInput;
502
+ payments?: Prisma.ContractPaymentUncheckedCreateNestedManyWithoutPhaseInput;
503
+ steps?: Prisma.ContractPhaseStepUncheckedCreateNestedManyWithoutPhaseInput;
504
+ };
505
+ export type ContractPhaseUpdateInput = {
506
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
507
+ name?: Prisma.StringFieldUpdateOperationsInput | string;
508
+ description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
509
+ phaseCategory?: Prisma.StringFieldUpdateOperationsInput | string;
510
+ phaseType?: Prisma.StringFieldUpdateOperationsInput | string;
511
+ order?: Prisma.IntFieldUpdateOperationsInput | number;
512
+ status?: Prisma.StringFieldUpdateOperationsInput | string;
513
+ totalAmount?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
514
+ paidAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
515
+ remainingAmount?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
516
+ interestRate?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
517
+ dueDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
518
+ startDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
519
+ endDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
520
+ activatedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
521
+ completedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
522
+ requiresPreviousPhaseCompletion?: Prisma.BoolFieldUpdateOperationsInput | boolean;
523
+ minimumCompletionPercentage?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
524
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
525
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
526
+ contract?: Prisma.ContractUpdateOneRequiredWithoutPhasesNestedInput;
527
+ paymentPlan?: Prisma.PaymentPlanUpdateOneWithoutContractPhasesNestedInput;
528
+ installments?: Prisma.ContractInstallmentUpdateManyWithoutPhaseNestedInput;
529
+ payments?: Prisma.ContractPaymentUpdateManyWithoutPhaseNestedInput;
530
+ steps?: Prisma.ContractPhaseStepUpdateManyWithoutPhaseNestedInput;
531
+ };
532
+ export type ContractPhaseUncheckedUpdateInput = {
533
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
534
+ contractId?: Prisma.StringFieldUpdateOperationsInput | string;
535
+ paymentPlanId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
536
+ name?: Prisma.StringFieldUpdateOperationsInput | string;
537
+ description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
538
+ phaseCategory?: Prisma.StringFieldUpdateOperationsInput | string;
539
+ phaseType?: Prisma.StringFieldUpdateOperationsInput | string;
540
+ order?: Prisma.IntFieldUpdateOperationsInput | number;
541
+ status?: Prisma.StringFieldUpdateOperationsInput | string;
542
+ totalAmount?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
543
+ paidAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
544
+ remainingAmount?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
545
+ interestRate?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
546
+ dueDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
547
+ startDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
548
+ endDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
549
+ activatedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
550
+ completedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
551
+ requiresPreviousPhaseCompletion?: Prisma.BoolFieldUpdateOperationsInput | boolean;
552
+ minimumCompletionPercentage?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
553
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
554
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
555
+ installments?: Prisma.ContractInstallmentUncheckedUpdateManyWithoutPhaseNestedInput;
556
+ payments?: Prisma.ContractPaymentUncheckedUpdateManyWithoutPhaseNestedInput;
557
+ steps?: Prisma.ContractPhaseStepUncheckedUpdateManyWithoutPhaseNestedInput;
558
+ };
559
+ export type ContractPhaseCreateManyInput = {
560
+ id?: string;
561
+ contractId: string;
562
+ paymentPlanId?: string | null;
563
+ name: string;
564
+ description?: string | null;
565
+ phaseCategory: string;
566
+ phaseType: string;
567
+ order: number;
568
+ status?: string;
569
+ totalAmount?: number | null;
570
+ paidAmount?: number;
571
+ remainingAmount?: number | null;
572
+ interestRate?: number | null;
573
+ dueDate?: Date | string | null;
574
+ startDate?: Date | string | null;
575
+ endDate?: Date | string | null;
576
+ activatedAt?: Date | string | null;
577
+ completedAt?: Date | string | null;
578
+ requiresPreviousPhaseCompletion?: boolean;
579
+ minimumCompletionPercentage?: number | null;
580
+ createdAt?: Date | string;
581
+ updatedAt?: Date | string;
582
+ };
583
+ export type ContractPhaseUpdateManyMutationInput = {
584
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
585
+ name?: Prisma.StringFieldUpdateOperationsInput | string;
586
+ description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
587
+ phaseCategory?: Prisma.StringFieldUpdateOperationsInput | string;
588
+ phaseType?: Prisma.StringFieldUpdateOperationsInput | string;
589
+ order?: Prisma.IntFieldUpdateOperationsInput | number;
590
+ status?: Prisma.StringFieldUpdateOperationsInput | string;
591
+ totalAmount?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
592
+ paidAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
593
+ remainingAmount?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
594
+ interestRate?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
595
+ dueDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
596
+ startDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
597
+ endDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
598
+ activatedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
599
+ completedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
600
+ requiresPreviousPhaseCompletion?: Prisma.BoolFieldUpdateOperationsInput | boolean;
601
+ minimumCompletionPercentage?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
602
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
603
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
604
+ };
605
+ export type ContractPhaseUncheckedUpdateManyInput = {
606
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
607
+ contractId?: Prisma.StringFieldUpdateOperationsInput | string;
608
+ paymentPlanId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
609
+ name?: Prisma.StringFieldUpdateOperationsInput | string;
610
+ description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
611
+ phaseCategory?: Prisma.StringFieldUpdateOperationsInput | string;
612
+ phaseType?: Prisma.StringFieldUpdateOperationsInput | string;
613
+ order?: Prisma.IntFieldUpdateOperationsInput | number;
614
+ status?: Prisma.StringFieldUpdateOperationsInput | string;
615
+ totalAmount?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
616
+ paidAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
617
+ remainingAmount?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
618
+ interestRate?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
619
+ dueDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
620
+ startDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
621
+ endDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
622
+ activatedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
623
+ completedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
624
+ requiresPreviousPhaseCompletion?: Prisma.BoolFieldUpdateOperationsInput | boolean;
625
+ minimumCompletionPercentage?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
626
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
627
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
628
+ };
629
+ export type ContractPhaseListRelationFilter = {
630
+ every?: Prisma.ContractPhaseWhereInput;
631
+ some?: Prisma.ContractPhaseWhereInput;
632
+ none?: Prisma.ContractPhaseWhereInput;
633
+ };
634
+ export type ContractPhaseOrderByRelationAggregateInput = {
635
+ _count?: Prisma.SortOrder;
636
+ };
637
+ export type ContractPhaseOrderByRelevanceInput = {
638
+ fields: Prisma.ContractPhaseOrderByRelevanceFieldEnum | Prisma.ContractPhaseOrderByRelevanceFieldEnum[];
639
+ sort: Prisma.SortOrder;
640
+ search: string;
641
+ };
642
+ export type ContractPhaseCountOrderByAggregateInput = {
643
+ id?: Prisma.SortOrder;
644
+ contractId?: Prisma.SortOrder;
645
+ paymentPlanId?: Prisma.SortOrder;
646
+ name?: Prisma.SortOrder;
647
+ description?: Prisma.SortOrder;
648
+ phaseCategory?: Prisma.SortOrder;
649
+ phaseType?: Prisma.SortOrder;
650
+ order?: Prisma.SortOrder;
651
+ status?: Prisma.SortOrder;
652
+ totalAmount?: Prisma.SortOrder;
653
+ paidAmount?: Prisma.SortOrder;
654
+ remainingAmount?: Prisma.SortOrder;
655
+ interestRate?: Prisma.SortOrder;
656
+ dueDate?: Prisma.SortOrder;
657
+ startDate?: Prisma.SortOrder;
658
+ endDate?: Prisma.SortOrder;
659
+ activatedAt?: Prisma.SortOrder;
660
+ completedAt?: Prisma.SortOrder;
661
+ requiresPreviousPhaseCompletion?: Prisma.SortOrder;
662
+ minimumCompletionPercentage?: Prisma.SortOrder;
663
+ createdAt?: Prisma.SortOrder;
664
+ updatedAt?: Prisma.SortOrder;
665
+ };
666
+ export type ContractPhaseAvgOrderByAggregateInput = {
667
+ order?: Prisma.SortOrder;
668
+ totalAmount?: Prisma.SortOrder;
669
+ paidAmount?: Prisma.SortOrder;
670
+ remainingAmount?: Prisma.SortOrder;
671
+ interestRate?: Prisma.SortOrder;
672
+ minimumCompletionPercentage?: Prisma.SortOrder;
673
+ };
674
+ export type ContractPhaseMaxOrderByAggregateInput = {
675
+ id?: Prisma.SortOrder;
676
+ contractId?: Prisma.SortOrder;
677
+ paymentPlanId?: Prisma.SortOrder;
678
+ name?: Prisma.SortOrder;
679
+ description?: Prisma.SortOrder;
680
+ phaseCategory?: Prisma.SortOrder;
681
+ phaseType?: Prisma.SortOrder;
682
+ order?: Prisma.SortOrder;
683
+ status?: Prisma.SortOrder;
684
+ totalAmount?: Prisma.SortOrder;
685
+ paidAmount?: Prisma.SortOrder;
686
+ remainingAmount?: Prisma.SortOrder;
687
+ interestRate?: Prisma.SortOrder;
688
+ dueDate?: Prisma.SortOrder;
689
+ startDate?: Prisma.SortOrder;
690
+ endDate?: Prisma.SortOrder;
691
+ activatedAt?: Prisma.SortOrder;
692
+ completedAt?: Prisma.SortOrder;
693
+ requiresPreviousPhaseCompletion?: Prisma.SortOrder;
694
+ minimumCompletionPercentage?: Prisma.SortOrder;
695
+ createdAt?: Prisma.SortOrder;
696
+ updatedAt?: Prisma.SortOrder;
697
+ };
698
+ export type ContractPhaseMinOrderByAggregateInput = {
699
+ id?: Prisma.SortOrder;
700
+ contractId?: Prisma.SortOrder;
701
+ paymentPlanId?: Prisma.SortOrder;
702
+ name?: Prisma.SortOrder;
703
+ description?: Prisma.SortOrder;
704
+ phaseCategory?: Prisma.SortOrder;
705
+ phaseType?: Prisma.SortOrder;
706
+ order?: Prisma.SortOrder;
707
+ status?: Prisma.SortOrder;
708
+ totalAmount?: Prisma.SortOrder;
709
+ paidAmount?: Prisma.SortOrder;
710
+ remainingAmount?: Prisma.SortOrder;
711
+ interestRate?: Prisma.SortOrder;
712
+ dueDate?: Prisma.SortOrder;
713
+ startDate?: Prisma.SortOrder;
714
+ endDate?: Prisma.SortOrder;
715
+ activatedAt?: Prisma.SortOrder;
716
+ completedAt?: Prisma.SortOrder;
717
+ requiresPreviousPhaseCompletion?: Prisma.SortOrder;
718
+ minimumCompletionPercentage?: Prisma.SortOrder;
719
+ createdAt?: Prisma.SortOrder;
720
+ updatedAt?: Prisma.SortOrder;
721
+ };
722
+ export type ContractPhaseSumOrderByAggregateInput = {
723
+ order?: Prisma.SortOrder;
724
+ totalAmount?: Prisma.SortOrder;
725
+ paidAmount?: Prisma.SortOrder;
726
+ remainingAmount?: Prisma.SortOrder;
727
+ interestRate?: Prisma.SortOrder;
728
+ minimumCompletionPercentage?: Prisma.SortOrder;
729
+ };
730
+ export type ContractPhaseScalarRelationFilter = {
731
+ is?: Prisma.ContractPhaseWhereInput;
732
+ isNot?: Prisma.ContractPhaseWhereInput;
733
+ };
734
+ export type ContractPhaseNullableScalarRelationFilter = {
735
+ is?: Prisma.ContractPhaseWhereInput | null;
736
+ isNot?: Prisma.ContractPhaseWhereInput | null;
737
+ };
738
+ export type ContractPhaseCreateNestedManyWithoutPaymentPlanInput = {
739
+ create?: Prisma.XOR<Prisma.ContractPhaseCreateWithoutPaymentPlanInput, Prisma.ContractPhaseUncheckedCreateWithoutPaymentPlanInput> | Prisma.ContractPhaseCreateWithoutPaymentPlanInput[] | Prisma.ContractPhaseUncheckedCreateWithoutPaymentPlanInput[];
740
+ connectOrCreate?: Prisma.ContractPhaseCreateOrConnectWithoutPaymentPlanInput | Prisma.ContractPhaseCreateOrConnectWithoutPaymentPlanInput[];
741
+ createMany?: Prisma.ContractPhaseCreateManyPaymentPlanInputEnvelope;
742
+ connect?: Prisma.ContractPhaseWhereUniqueInput | Prisma.ContractPhaseWhereUniqueInput[];
743
+ };
744
+ export type ContractPhaseUncheckedCreateNestedManyWithoutPaymentPlanInput = {
745
+ create?: Prisma.XOR<Prisma.ContractPhaseCreateWithoutPaymentPlanInput, Prisma.ContractPhaseUncheckedCreateWithoutPaymentPlanInput> | Prisma.ContractPhaseCreateWithoutPaymentPlanInput[] | Prisma.ContractPhaseUncheckedCreateWithoutPaymentPlanInput[];
746
+ connectOrCreate?: Prisma.ContractPhaseCreateOrConnectWithoutPaymentPlanInput | Prisma.ContractPhaseCreateOrConnectWithoutPaymentPlanInput[];
747
+ createMany?: Prisma.ContractPhaseCreateManyPaymentPlanInputEnvelope;
748
+ connect?: Prisma.ContractPhaseWhereUniqueInput | Prisma.ContractPhaseWhereUniqueInput[];
749
+ };
750
+ export type ContractPhaseUpdateManyWithoutPaymentPlanNestedInput = {
751
+ create?: Prisma.XOR<Prisma.ContractPhaseCreateWithoutPaymentPlanInput, Prisma.ContractPhaseUncheckedCreateWithoutPaymentPlanInput> | Prisma.ContractPhaseCreateWithoutPaymentPlanInput[] | Prisma.ContractPhaseUncheckedCreateWithoutPaymentPlanInput[];
752
+ connectOrCreate?: Prisma.ContractPhaseCreateOrConnectWithoutPaymentPlanInput | Prisma.ContractPhaseCreateOrConnectWithoutPaymentPlanInput[];
753
+ upsert?: Prisma.ContractPhaseUpsertWithWhereUniqueWithoutPaymentPlanInput | Prisma.ContractPhaseUpsertWithWhereUniqueWithoutPaymentPlanInput[];
754
+ createMany?: Prisma.ContractPhaseCreateManyPaymentPlanInputEnvelope;
755
+ set?: Prisma.ContractPhaseWhereUniqueInput | Prisma.ContractPhaseWhereUniqueInput[];
756
+ disconnect?: Prisma.ContractPhaseWhereUniqueInput | Prisma.ContractPhaseWhereUniqueInput[];
757
+ delete?: Prisma.ContractPhaseWhereUniqueInput | Prisma.ContractPhaseWhereUniqueInput[];
758
+ connect?: Prisma.ContractPhaseWhereUniqueInput | Prisma.ContractPhaseWhereUniqueInput[];
759
+ update?: Prisma.ContractPhaseUpdateWithWhereUniqueWithoutPaymentPlanInput | Prisma.ContractPhaseUpdateWithWhereUniqueWithoutPaymentPlanInput[];
760
+ updateMany?: Prisma.ContractPhaseUpdateManyWithWhereWithoutPaymentPlanInput | Prisma.ContractPhaseUpdateManyWithWhereWithoutPaymentPlanInput[];
761
+ deleteMany?: Prisma.ContractPhaseScalarWhereInput | Prisma.ContractPhaseScalarWhereInput[];
762
+ };
763
+ export type ContractPhaseUncheckedUpdateManyWithoutPaymentPlanNestedInput = {
764
+ create?: Prisma.XOR<Prisma.ContractPhaseCreateWithoutPaymentPlanInput, Prisma.ContractPhaseUncheckedCreateWithoutPaymentPlanInput> | Prisma.ContractPhaseCreateWithoutPaymentPlanInput[] | Prisma.ContractPhaseUncheckedCreateWithoutPaymentPlanInput[];
765
+ connectOrCreate?: Prisma.ContractPhaseCreateOrConnectWithoutPaymentPlanInput | Prisma.ContractPhaseCreateOrConnectWithoutPaymentPlanInput[];
766
+ upsert?: Prisma.ContractPhaseUpsertWithWhereUniqueWithoutPaymentPlanInput | Prisma.ContractPhaseUpsertWithWhereUniqueWithoutPaymentPlanInput[];
767
+ createMany?: Prisma.ContractPhaseCreateManyPaymentPlanInputEnvelope;
768
+ set?: Prisma.ContractPhaseWhereUniqueInput | Prisma.ContractPhaseWhereUniqueInput[];
769
+ disconnect?: Prisma.ContractPhaseWhereUniqueInput | Prisma.ContractPhaseWhereUniqueInput[];
770
+ delete?: Prisma.ContractPhaseWhereUniqueInput | Prisma.ContractPhaseWhereUniqueInput[];
771
+ connect?: Prisma.ContractPhaseWhereUniqueInput | Prisma.ContractPhaseWhereUniqueInput[];
772
+ update?: Prisma.ContractPhaseUpdateWithWhereUniqueWithoutPaymentPlanInput | Prisma.ContractPhaseUpdateWithWhereUniqueWithoutPaymentPlanInput[];
773
+ updateMany?: Prisma.ContractPhaseUpdateManyWithWhereWithoutPaymentPlanInput | Prisma.ContractPhaseUpdateManyWithWhereWithoutPaymentPlanInput[];
774
+ deleteMany?: Prisma.ContractPhaseScalarWhereInput | Prisma.ContractPhaseScalarWhereInput[];
775
+ };
776
+ export type ContractPhaseCreateNestedManyWithoutContractInput = {
777
+ create?: Prisma.XOR<Prisma.ContractPhaseCreateWithoutContractInput, Prisma.ContractPhaseUncheckedCreateWithoutContractInput> | Prisma.ContractPhaseCreateWithoutContractInput[] | Prisma.ContractPhaseUncheckedCreateWithoutContractInput[];
778
+ connectOrCreate?: Prisma.ContractPhaseCreateOrConnectWithoutContractInput | Prisma.ContractPhaseCreateOrConnectWithoutContractInput[];
779
+ createMany?: Prisma.ContractPhaseCreateManyContractInputEnvelope;
780
+ connect?: Prisma.ContractPhaseWhereUniqueInput | Prisma.ContractPhaseWhereUniqueInput[];
781
+ };
782
+ export type ContractPhaseUncheckedCreateNestedManyWithoutContractInput = {
783
+ create?: Prisma.XOR<Prisma.ContractPhaseCreateWithoutContractInput, Prisma.ContractPhaseUncheckedCreateWithoutContractInput> | Prisma.ContractPhaseCreateWithoutContractInput[] | Prisma.ContractPhaseUncheckedCreateWithoutContractInput[];
784
+ connectOrCreate?: Prisma.ContractPhaseCreateOrConnectWithoutContractInput | Prisma.ContractPhaseCreateOrConnectWithoutContractInput[];
785
+ createMany?: Prisma.ContractPhaseCreateManyContractInputEnvelope;
786
+ connect?: Prisma.ContractPhaseWhereUniqueInput | Prisma.ContractPhaseWhereUniqueInput[];
787
+ };
788
+ export type ContractPhaseUpdateManyWithoutContractNestedInput = {
789
+ create?: Prisma.XOR<Prisma.ContractPhaseCreateWithoutContractInput, Prisma.ContractPhaseUncheckedCreateWithoutContractInput> | Prisma.ContractPhaseCreateWithoutContractInput[] | Prisma.ContractPhaseUncheckedCreateWithoutContractInput[];
790
+ connectOrCreate?: Prisma.ContractPhaseCreateOrConnectWithoutContractInput | Prisma.ContractPhaseCreateOrConnectWithoutContractInput[];
791
+ upsert?: Prisma.ContractPhaseUpsertWithWhereUniqueWithoutContractInput | Prisma.ContractPhaseUpsertWithWhereUniqueWithoutContractInput[];
792
+ createMany?: Prisma.ContractPhaseCreateManyContractInputEnvelope;
793
+ set?: Prisma.ContractPhaseWhereUniqueInput | Prisma.ContractPhaseWhereUniqueInput[];
794
+ disconnect?: Prisma.ContractPhaseWhereUniqueInput | Prisma.ContractPhaseWhereUniqueInput[];
795
+ delete?: Prisma.ContractPhaseWhereUniqueInput | Prisma.ContractPhaseWhereUniqueInput[];
796
+ connect?: Prisma.ContractPhaseWhereUniqueInput | Prisma.ContractPhaseWhereUniqueInput[];
797
+ update?: Prisma.ContractPhaseUpdateWithWhereUniqueWithoutContractInput | Prisma.ContractPhaseUpdateWithWhereUniqueWithoutContractInput[];
798
+ updateMany?: Prisma.ContractPhaseUpdateManyWithWhereWithoutContractInput | Prisma.ContractPhaseUpdateManyWithWhereWithoutContractInput[];
799
+ deleteMany?: Prisma.ContractPhaseScalarWhereInput | Prisma.ContractPhaseScalarWhereInput[];
800
+ };
801
+ export type ContractPhaseUncheckedUpdateManyWithoutContractNestedInput = {
802
+ create?: Prisma.XOR<Prisma.ContractPhaseCreateWithoutContractInput, Prisma.ContractPhaseUncheckedCreateWithoutContractInput> | Prisma.ContractPhaseCreateWithoutContractInput[] | Prisma.ContractPhaseUncheckedCreateWithoutContractInput[];
803
+ connectOrCreate?: Prisma.ContractPhaseCreateOrConnectWithoutContractInput | Prisma.ContractPhaseCreateOrConnectWithoutContractInput[];
804
+ upsert?: Prisma.ContractPhaseUpsertWithWhereUniqueWithoutContractInput | Prisma.ContractPhaseUpsertWithWhereUniqueWithoutContractInput[];
805
+ createMany?: Prisma.ContractPhaseCreateManyContractInputEnvelope;
806
+ set?: Prisma.ContractPhaseWhereUniqueInput | Prisma.ContractPhaseWhereUniqueInput[];
807
+ disconnect?: Prisma.ContractPhaseWhereUniqueInput | Prisma.ContractPhaseWhereUniqueInput[];
808
+ delete?: Prisma.ContractPhaseWhereUniqueInput | Prisma.ContractPhaseWhereUniqueInput[];
809
+ connect?: Prisma.ContractPhaseWhereUniqueInput | Prisma.ContractPhaseWhereUniqueInput[];
810
+ update?: Prisma.ContractPhaseUpdateWithWhereUniqueWithoutContractInput | Prisma.ContractPhaseUpdateWithWhereUniqueWithoutContractInput[];
811
+ updateMany?: Prisma.ContractPhaseUpdateManyWithWhereWithoutContractInput | Prisma.ContractPhaseUpdateManyWithWhereWithoutContractInput[];
812
+ deleteMany?: Prisma.ContractPhaseScalarWhereInput | Prisma.ContractPhaseScalarWhereInput[];
813
+ };
814
+ export type ContractPhaseCreateNestedOneWithoutStepsInput = {
815
+ create?: Prisma.XOR<Prisma.ContractPhaseCreateWithoutStepsInput, Prisma.ContractPhaseUncheckedCreateWithoutStepsInput>;
816
+ connectOrCreate?: Prisma.ContractPhaseCreateOrConnectWithoutStepsInput;
817
+ connect?: Prisma.ContractPhaseWhereUniqueInput;
818
+ };
819
+ export type ContractPhaseUpdateOneRequiredWithoutStepsNestedInput = {
820
+ create?: Prisma.XOR<Prisma.ContractPhaseCreateWithoutStepsInput, Prisma.ContractPhaseUncheckedCreateWithoutStepsInput>;
821
+ connectOrCreate?: Prisma.ContractPhaseCreateOrConnectWithoutStepsInput;
822
+ upsert?: Prisma.ContractPhaseUpsertWithoutStepsInput;
823
+ connect?: Prisma.ContractPhaseWhereUniqueInput;
824
+ update?: Prisma.XOR<Prisma.XOR<Prisma.ContractPhaseUpdateToOneWithWhereWithoutStepsInput, Prisma.ContractPhaseUpdateWithoutStepsInput>, Prisma.ContractPhaseUncheckedUpdateWithoutStepsInput>;
825
+ };
826
+ export type ContractPhaseCreateNestedOneWithoutInstallmentsInput = {
827
+ create?: Prisma.XOR<Prisma.ContractPhaseCreateWithoutInstallmentsInput, Prisma.ContractPhaseUncheckedCreateWithoutInstallmentsInput>;
828
+ connectOrCreate?: Prisma.ContractPhaseCreateOrConnectWithoutInstallmentsInput;
829
+ connect?: Prisma.ContractPhaseWhereUniqueInput;
830
+ };
831
+ export type ContractPhaseUpdateOneRequiredWithoutInstallmentsNestedInput = {
832
+ create?: Prisma.XOR<Prisma.ContractPhaseCreateWithoutInstallmentsInput, Prisma.ContractPhaseUncheckedCreateWithoutInstallmentsInput>;
833
+ connectOrCreate?: Prisma.ContractPhaseCreateOrConnectWithoutInstallmentsInput;
834
+ upsert?: Prisma.ContractPhaseUpsertWithoutInstallmentsInput;
835
+ connect?: Prisma.ContractPhaseWhereUniqueInput;
836
+ update?: Prisma.XOR<Prisma.XOR<Prisma.ContractPhaseUpdateToOneWithWhereWithoutInstallmentsInput, Prisma.ContractPhaseUpdateWithoutInstallmentsInput>, Prisma.ContractPhaseUncheckedUpdateWithoutInstallmentsInput>;
837
+ };
838
+ export type ContractPhaseCreateNestedOneWithoutPaymentsInput = {
839
+ create?: Prisma.XOR<Prisma.ContractPhaseCreateWithoutPaymentsInput, Prisma.ContractPhaseUncheckedCreateWithoutPaymentsInput>;
840
+ connectOrCreate?: Prisma.ContractPhaseCreateOrConnectWithoutPaymentsInput;
841
+ connect?: Prisma.ContractPhaseWhereUniqueInput;
842
+ };
843
+ export type ContractPhaseUpdateOneWithoutPaymentsNestedInput = {
844
+ create?: Prisma.XOR<Prisma.ContractPhaseCreateWithoutPaymentsInput, Prisma.ContractPhaseUncheckedCreateWithoutPaymentsInput>;
845
+ connectOrCreate?: Prisma.ContractPhaseCreateOrConnectWithoutPaymentsInput;
846
+ upsert?: Prisma.ContractPhaseUpsertWithoutPaymentsInput;
847
+ disconnect?: Prisma.ContractPhaseWhereInput | boolean;
848
+ delete?: Prisma.ContractPhaseWhereInput | boolean;
849
+ connect?: Prisma.ContractPhaseWhereUniqueInput;
850
+ update?: Prisma.XOR<Prisma.XOR<Prisma.ContractPhaseUpdateToOneWithWhereWithoutPaymentsInput, Prisma.ContractPhaseUpdateWithoutPaymentsInput>, Prisma.ContractPhaseUncheckedUpdateWithoutPaymentsInput>;
851
+ };
852
+ export type ContractPhaseCreateWithoutPaymentPlanInput = {
853
+ id?: string;
854
+ name: string;
855
+ description?: string | null;
856
+ phaseCategory: string;
857
+ phaseType: string;
858
+ order: number;
859
+ status?: string;
860
+ totalAmount?: number | null;
861
+ paidAmount?: number;
862
+ remainingAmount?: number | null;
863
+ interestRate?: number | null;
864
+ dueDate?: Date | string | null;
865
+ startDate?: Date | string | null;
866
+ endDate?: Date | string | null;
867
+ activatedAt?: Date | string | null;
868
+ completedAt?: Date | string | null;
869
+ requiresPreviousPhaseCompletion?: boolean;
870
+ minimumCompletionPercentage?: number | null;
871
+ createdAt?: Date | string;
872
+ updatedAt?: Date | string;
873
+ contract: Prisma.ContractCreateNestedOneWithoutPhasesInput;
874
+ installments?: Prisma.ContractInstallmentCreateNestedManyWithoutPhaseInput;
875
+ payments?: Prisma.ContractPaymentCreateNestedManyWithoutPhaseInput;
876
+ steps?: Prisma.ContractPhaseStepCreateNestedManyWithoutPhaseInput;
877
+ };
878
+ export type ContractPhaseUncheckedCreateWithoutPaymentPlanInput = {
879
+ id?: string;
880
+ contractId: string;
881
+ name: string;
882
+ description?: string | null;
883
+ phaseCategory: string;
884
+ phaseType: string;
885
+ order: number;
886
+ status?: string;
887
+ totalAmount?: number | null;
888
+ paidAmount?: number;
889
+ remainingAmount?: number | null;
890
+ interestRate?: number | null;
891
+ dueDate?: Date | string | null;
892
+ startDate?: Date | string | null;
893
+ endDate?: Date | string | null;
894
+ activatedAt?: Date | string | null;
895
+ completedAt?: Date | string | null;
896
+ requiresPreviousPhaseCompletion?: boolean;
897
+ minimumCompletionPercentage?: number | null;
898
+ createdAt?: Date | string;
899
+ updatedAt?: Date | string;
900
+ installments?: Prisma.ContractInstallmentUncheckedCreateNestedManyWithoutPhaseInput;
901
+ payments?: Prisma.ContractPaymentUncheckedCreateNestedManyWithoutPhaseInput;
902
+ steps?: Prisma.ContractPhaseStepUncheckedCreateNestedManyWithoutPhaseInput;
903
+ };
904
+ export type ContractPhaseCreateOrConnectWithoutPaymentPlanInput = {
905
+ where: Prisma.ContractPhaseWhereUniqueInput;
906
+ create: Prisma.XOR<Prisma.ContractPhaseCreateWithoutPaymentPlanInput, Prisma.ContractPhaseUncheckedCreateWithoutPaymentPlanInput>;
907
+ };
908
+ export type ContractPhaseCreateManyPaymentPlanInputEnvelope = {
909
+ data: Prisma.ContractPhaseCreateManyPaymentPlanInput | Prisma.ContractPhaseCreateManyPaymentPlanInput[];
910
+ skipDuplicates?: boolean;
911
+ };
912
+ export type ContractPhaseUpsertWithWhereUniqueWithoutPaymentPlanInput = {
913
+ where: Prisma.ContractPhaseWhereUniqueInput;
914
+ update: Prisma.XOR<Prisma.ContractPhaseUpdateWithoutPaymentPlanInput, Prisma.ContractPhaseUncheckedUpdateWithoutPaymentPlanInput>;
915
+ create: Prisma.XOR<Prisma.ContractPhaseCreateWithoutPaymentPlanInput, Prisma.ContractPhaseUncheckedCreateWithoutPaymentPlanInput>;
916
+ };
917
+ export type ContractPhaseUpdateWithWhereUniqueWithoutPaymentPlanInput = {
918
+ where: Prisma.ContractPhaseWhereUniqueInput;
919
+ data: Prisma.XOR<Prisma.ContractPhaseUpdateWithoutPaymentPlanInput, Prisma.ContractPhaseUncheckedUpdateWithoutPaymentPlanInput>;
920
+ };
921
+ export type ContractPhaseUpdateManyWithWhereWithoutPaymentPlanInput = {
922
+ where: Prisma.ContractPhaseScalarWhereInput;
923
+ data: Prisma.XOR<Prisma.ContractPhaseUpdateManyMutationInput, Prisma.ContractPhaseUncheckedUpdateManyWithoutPaymentPlanInput>;
924
+ };
925
+ export type ContractPhaseScalarWhereInput = {
926
+ AND?: Prisma.ContractPhaseScalarWhereInput | Prisma.ContractPhaseScalarWhereInput[];
927
+ OR?: Prisma.ContractPhaseScalarWhereInput[];
928
+ NOT?: Prisma.ContractPhaseScalarWhereInput | Prisma.ContractPhaseScalarWhereInput[];
929
+ id?: Prisma.StringFilter<"ContractPhase"> | string;
930
+ contractId?: Prisma.StringFilter<"ContractPhase"> | string;
931
+ paymentPlanId?: Prisma.StringNullableFilter<"ContractPhase"> | string | null;
932
+ name?: Prisma.StringFilter<"ContractPhase"> | string;
933
+ description?: Prisma.StringNullableFilter<"ContractPhase"> | string | null;
934
+ phaseCategory?: Prisma.StringFilter<"ContractPhase"> | string;
935
+ phaseType?: Prisma.StringFilter<"ContractPhase"> | string;
936
+ order?: Prisma.IntFilter<"ContractPhase"> | number;
937
+ status?: Prisma.StringFilter<"ContractPhase"> | string;
938
+ totalAmount?: Prisma.FloatNullableFilter<"ContractPhase"> | number | null;
939
+ paidAmount?: Prisma.FloatFilter<"ContractPhase"> | number;
940
+ remainingAmount?: Prisma.FloatNullableFilter<"ContractPhase"> | number | null;
941
+ interestRate?: Prisma.FloatNullableFilter<"ContractPhase"> | number | null;
942
+ dueDate?: Prisma.DateTimeNullableFilter<"ContractPhase"> | Date | string | null;
943
+ startDate?: Prisma.DateTimeNullableFilter<"ContractPhase"> | Date | string | null;
944
+ endDate?: Prisma.DateTimeNullableFilter<"ContractPhase"> | Date | string | null;
945
+ activatedAt?: Prisma.DateTimeNullableFilter<"ContractPhase"> | Date | string | null;
946
+ completedAt?: Prisma.DateTimeNullableFilter<"ContractPhase"> | Date | string | null;
947
+ requiresPreviousPhaseCompletion?: Prisma.BoolFilter<"ContractPhase"> | boolean;
948
+ minimumCompletionPercentage?: Prisma.FloatNullableFilter<"ContractPhase"> | number | null;
949
+ createdAt?: Prisma.DateTimeFilter<"ContractPhase"> | Date | string;
950
+ updatedAt?: Prisma.DateTimeFilter<"ContractPhase"> | Date | string;
951
+ };
952
+ export type ContractPhaseCreateWithoutContractInput = {
953
+ id?: string;
954
+ name: string;
955
+ description?: string | null;
956
+ phaseCategory: string;
957
+ phaseType: string;
958
+ order: number;
959
+ status?: string;
960
+ totalAmount?: number | null;
961
+ paidAmount?: number;
962
+ remainingAmount?: number | null;
963
+ interestRate?: number | null;
964
+ dueDate?: Date | string | null;
965
+ startDate?: Date | string | null;
966
+ endDate?: Date | string | null;
967
+ activatedAt?: Date | string | null;
968
+ completedAt?: Date | string | null;
969
+ requiresPreviousPhaseCompletion?: boolean;
970
+ minimumCompletionPercentage?: number | null;
971
+ createdAt?: Date | string;
972
+ updatedAt?: Date | string;
973
+ paymentPlan?: Prisma.PaymentPlanCreateNestedOneWithoutContractPhasesInput;
974
+ installments?: Prisma.ContractInstallmentCreateNestedManyWithoutPhaseInput;
975
+ payments?: Prisma.ContractPaymentCreateNestedManyWithoutPhaseInput;
976
+ steps?: Prisma.ContractPhaseStepCreateNestedManyWithoutPhaseInput;
977
+ };
978
+ export type ContractPhaseUncheckedCreateWithoutContractInput = {
979
+ id?: string;
980
+ paymentPlanId?: string | null;
981
+ name: string;
982
+ description?: string | null;
983
+ phaseCategory: string;
984
+ phaseType: string;
985
+ order: number;
986
+ status?: string;
987
+ totalAmount?: number | null;
988
+ paidAmount?: number;
989
+ remainingAmount?: number | null;
990
+ interestRate?: number | null;
991
+ dueDate?: Date | string | null;
992
+ startDate?: Date | string | null;
993
+ endDate?: Date | string | null;
994
+ activatedAt?: Date | string | null;
995
+ completedAt?: Date | string | null;
996
+ requiresPreviousPhaseCompletion?: boolean;
997
+ minimumCompletionPercentage?: number | null;
998
+ createdAt?: Date | string;
999
+ updatedAt?: Date | string;
1000
+ installments?: Prisma.ContractInstallmentUncheckedCreateNestedManyWithoutPhaseInput;
1001
+ payments?: Prisma.ContractPaymentUncheckedCreateNestedManyWithoutPhaseInput;
1002
+ steps?: Prisma.ContractPhaseStepUncheckedCreateNestedManyWithoutPhaseInput;
1003
+ };
1004
+ export type ContractPhaseCreateOrConnectWithoutContractInput = {
1005
+ where: Prisma.ContractPhaseWhereUniqueInput;
1006
+ create: Prisma.XOR<Prisma.ContractPhaseCreateWithoutContractInput, Prisma.ContractPhaseUncheckedCreateWithoutContractInput>;
1007
+ };
1008
+ export type ContractPhaseCreateManyContractInputEnvelope = {
1009
+ data: Prisma.ContractPhaseCreateManyContractInput | Prisma.ContractPhaseCreateManyContractInput[];
1010
+ skipDuplicates?: boolean;
1011
+ };
1012
+ export type ContractPhaseUpsertWithWhereUniqueWithoutContractInput = {
1013
+ where: Prisma.ContractPhaseWhereUniqueInput;
1014
+ update: Prisma.XOR<Prisma.ContractPhaseUpdateWithoutContractInput, Prisma.ContractPhaseUncheckedUpdateWithoutContractInput>;
1015
+ create: Prisma.XOR<Prisma.ContractPhaseCreateWithoutContractInput, Prisma.ContractPhaseUncheckedCreateWithoutContractInput>;
1016
+ };
1017
+ export type ContractPhaseUpdateWithWhereUniqueWithoutContractInput = {
1018
+ where: Prisma.ContractPhaseWhereUniqueInput;
1019
+ data: Prisma.XOR<Prisma.ContractPhaseUpdateWithoutContractInput, Prisma.ContractPhaseUncheckedUpdateWithoutContractInput>;
1020
+ };
1021
+ export type ContractPhaseUpdateManyWithWhereWithoutContractInput = {
1022
+ where: Prisma.ContractPhaseScalarWhereInput;
1023
+ data: Prisma.XOR<Prisma.ContractPhaseUpdateManyMutationInput, Prisma.ContractPhaseUncheckedUpdateManyWithoutContractInput>;
1024
+ };
1025
+ export type ContractPhaseCreateWithoutStepsInput = {
1026
+ id?: string;
1027
+ name: string;
1028
+ description?: string | null;
1029
+ phaseCategory: string;
1030
+ phaseType: string;
1031
+ order: number;
1032
+ status?: string;
1033
+ totalAmount?: number | null;
1034
+ paidAmount?: number;
1035
+ remainingAmount?: number | null;
1036
+ interestRate?: number | null;
1037
+ dueDate?: Date | string | null;
1038
+ startDate?: Date | string | null;
1039
+ endDate?: Date | string | null;
1040
+ activatedAt?: Date | string | null;
1041
+ completedAt?: Date | string | null;
1042
+ requiresPreviousPhaseCompletion?: boolean;
1043
+ minimumCompletionPercentage?: number | null;
1044
+ createdAt?: Date | string;
1045
+ updatedAt?: Date | string;
1046
+ contract: Prisma.ContractCreateNestedOneWithoutPhasesInput;
1047
+ paymentPlan?: Prisma.PaymentPlanCreateNestedOneWithoutContractPhasesInput;
1048
+ installments?: Prisma.ContractInstallmentCreateNestedManyWithoutPhaseInput;
1049
+ payments?: Prisma.ContractPaymentCreateNestedManyWithoutPhaseInput;
1050
+ };
1051
+ export type ContractPhaseUncheckedCreateWithoutStepsInput = {
1052
+ id?: string;
1053
+ contractId: string;
1054
+ paymentPlanId?: string | null;
1055
+ name: string;
1056
+ description?: string | null;
1057
+ phaseCategory: string;
1058
+ phaseType: string;
1059
+ order: number;
1060
+ status?: string;
1061
+ totalAmount?: number | null;
1062
+ paidAmount?: number;
1063
+ remainingAmount?: number | null;
1064
+ interestRate?: number | null;
1065
+ dueDate?: Date | string | null;
1066
+ startDate?: Date | string | null;
1067
+ endDate?: Date | string | null;
1068
+ activatedAt?: Date | string | null;
1069
+ completedAt?: Date | string | null;
1070
+ requiresPreviousPhaseCompletion?: boolean;
1071
+ minimumCompletionPercentage?: number | null;
1072
+ createdAt?: Date | string;
1073
+ updatedAt?: Date | string;
1074
+ installments?: Prisma.ContractInstallmentUncheckedCreateNestedManyWithoutPhaseInput;
1075
+ payments?: Prisma.ContractPaymentUncheckedCreateNestedManyWithoutPhaseInput;
1076
+ };
1077
+ export type ContractPhaseCreateOrConnectWithoutStepsInput = {
1078
+ where: Prisma.ContractPhaseWhereUniqueInput;
1079
+ create: Prisma.XOR<Prisma.ContractPhaseCreateWithoutStepsInput, Prisma.ContractPhaseUncheckedCreateWithoutStepsInput>;
1080
+ };
1081
+ export type ContractPhaseUpsertWithoutStepsInput = {
1082
+ update: Prisma.XOR<Prisma.ContractPhaseUpdateWithoutStepsInput, Prisma.ContractPhaseUncheckedUpdateWithoutStepsInput>;
1083
+ create: Prisma.XOR<Prisma.ContractPhaseCreateWithoutStepsInput, Prisma.ContractPhaseUncheckedCreateWithoutStepsInput>;
1084
+ where?: Prisma.ContractPhaseWhereInput;
1085
+ };
1086
+ export type ContractPhaseUpdateToOneWithWhereWithoutStepsInput = {
1087
+ where?: Prisma.ContractPhaseWhereInput;
1088
+ data: Prisma.XOR<Prisma.ContractPhaseUpdateWithoutStepsInput, Prisma.ContractPhaseUncheckedUpdateWithoutStepsInput>;
1089
+ };
1090
+ export type ContractPhaseUpdateWithoutStepsInput = {
1091
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
1092
+ name?: Prisma.StringFieldUpdateOperationsInput | string;
1093
+ description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1094
+ phaseCategory?: Prisma.StringFieldUpdateOperationsInput | string;
1095
+ phaseType?: Prisma.StringFieldUpdateOperationsInput | string;
1096
+ order?: Prisma.IntFieldUpdateOperationsInput | number;
1097
+ status?: Prisma.StringFieldUpdateOperationsInput | string;
1098
+ totalAmount?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
1099
+ paidAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
1100
+ remainingAmount?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
1101
+ interestRate?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
1102
+ dueDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1103
+ startDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1104
+ endDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1105
+ activatedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1106
+ completedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1107
+ requiresPreviousPhaseCompletion?: Prisma.BoolFieldUpdateOperationsInput | boolean;
1108
+ minimumCompletionPercentage?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
1109
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
1110
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
1111
+ contract?: Prisma.ContractUpdateOneRequiredWithoutPhasesNestedInput;
1112
+ paymentPlan?: Prisma.PaymentPlanUpdateOneWithoutContractPhasesNestedInput;
1113
+ installments?: Prisma.ContractInstallmentUpdateManyWithoutPhaseNestedInput;
1114
+ payments?: Prisma.ContractPaymentUpdateManyWithoutPhaseNestedInput;
1115
+ };
1116
+ export type ContractPhaseUncheckedUpdateWithoutStepsInput = {
1117
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
1118
+ contractId?: Prisma.StringFieldUpdateOperationsInput | string;
1119
+ paymentPlanId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1120
+ name?: Prisma.StringFieldUpdateOperationsInput | string;
1121
+ description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1122
+ phaseCategory?: Prisma.StringFieldUpdateOperationsInput | string;
1123
+ phaseType?: Prisma.StringFieldUpdateOperationsInput | string;
1124
+ order?: Prisma.IntFieldUpdateOperationsInput | number;
1125
+ status?: Prisma.StringFieldUpdateOperationsInput | string;
1126
+ totalAmount?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
1127
+ paidAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
1128
+ remainingAmount?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
1129
+ interestRate?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
1130
+ dueDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1131
+ startDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1132
+ endDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1133
+ activatedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1134
+ completedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1135
+ requiresPreviousPhaseCompletion?: Prisma.BoolFieldUpdateOperationsInput | boolean;
1136
+ minimumCompletionPercentage?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
1137
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
1138
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
1139
+ installments?: Prisma.ContractInstallmentUncheckedUpdateManyWithoutPhaseNestedInput;
1140
+ payments?: Prisma.ContractPaymentUncheckedUpdateManyWithoutPhaseNestedInput;
1141
+ };
1142
+ export type ContractPhaseCreateWithoutInstallmentsInput = {
1143
+ id?: string;
1144
+ name: string;
1145
+ description?: string | null;
1146
+ phaseCategory: string;
1147
+ phaseType: string;
1148
+ order: number;
1149
+ status?: string;
1150
+ totalAmount?: number | null;
1151
+ paidAmount?: number;
1152
+ remainingAmount?: number | null;
1153
+ interestRate?: number | null;
1154
+ dueDate?: Date | string | null;
1155
+ startDate?: Date | string | null;
1156
+ endDate?: Date | string | null;
1157
+ activatedAt?: Date | string | null;
1158
+ completedAt?: Date | string | null;
1159
+ requiresPreviousPhaseCompletion?: boolean;
1160
+ minimumCompletionPercentage?: number | null;
1161
+ createdAt?: Date | string;
1162
+ updatedAt?: Date | string;
1163
+ contract: Prisma.ContractCreateNestedOneWithoutPhasesInput;
1164
+ paymentPlan?: Prisma.PaymentPlanCreateNestedOneWithoutContractPhasesInput;
1165
+ payments?: Prisma.ContractPaymentCreateNestedManyWithoutPhaseInput;
1166
+ steps?: Prisma.ContractPhaseStepCreateNestedManyWithoutPhaseInput;
1167
+ };
1168
+ export type ContractPhaseUncheckedCreateWithoutInstallmentsInput = {
1169
+ id?: string;
1170
+ contractId: string;
1171
+ paymentPlanId?: string | null;
1172
+ name: string;
1173
+ description?: string | null;
1174
+ phaseCategory: string;
1175
+ phaseType: string;
1176
+ order: number;
1177
+ status?: string;
1178
+ totalAmount?: number | null;
1179
+ paidAmount?: number;
1180
+ remainingAmount?: number | null;
1181
+ interestRate?: number | null;
1182
+ dueDate?: Date | string | null;
1183
+ startDate?: Date | string | null;
1184
+ endDate?: Date | string | null;
1185
+ activatedAt?: Date | string | null;
1186
+ completedAt?: Date | string | null;
1187
+ requiresPreviousPhaseCompletion?: boolean;
1188
+ minimumCompletionPercentage?: number | null;
1189
+ createdAt?: Date | string;
1190
+ updatedAt?: Date | string;
1191
+ payments?: Prisma.ContractPaymentUncheckedCreateNestedManyWithoutPhaseInput;
1192
+ steps?: Prisma.ContractPhaseStepUncheckedCreateNestedManyWithoutPhaseInput;
1193
+ };
1194
+ export type ContractPhaseCreateOrConnectWithoutInstallmentsInput = {
1195
+ where: Prisma.ContractPhaseWhereUniqueInput;
1196
+ create: Prisma.XOR<Prisma.ContractPhaseCreateWithoutInstallmentsInput, Prisma.ContractPhaseUncheckedCreateWithoutInstallmentsInput>;
1197
+ };
1198
+ export type ContractPhaseUpsertWithoutInstallmentsInput = {
1199
+ update: Prisma.XOR<Prisma.ContractPhaseUpdateWithoutInstallmentsInput, Prisma.ContractPhaseUncheckedUpdateWithoutInstallmentsInput>;
1200
+ create: Prisma.XOR<Prisma.ContractPhaseCreateWithoutInstallmentsInput, Prisma.ContractPhaseUncheckedCreateWithoutInstallmentsInput>;
1201
+ where?: Prisma.ContractPhaseWhereInput;
1202
+ };
1203
+ export type ContractPhaseUpdateToOneWithWhereWithoutInstallmentsInput = {
1204
+ where?: Prisma.ContractPhaseWhereInput;
1205
+ data: Prisma.XOR<Prisma.ContractPhaseUpdateWithoutInstallmentsInput, Prisma.ContractPhaseUncheckedUpdateWithoutInstallmentsInput>;
1206
+ };
1207
+ export type ContractPhaseUpdateWithoutInstallmentsInput = {
1208
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
1209
+ name?: Prisma.StringFieldUpdateOperationsInput | string;
1210
+ description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1211
+ phaseCategory?: Prisma.StringFieldUpdateOperationsInput | string;
1212
+ phaseType?: Prisma.StringFieldUpdateOperationsInput | string;
1213
+ order?: Prisma.IntFieldUpdateOperationsInput | number;
1214
+ status?: Prisma.StringFieldUpdateOperationsInput | string;
1215
+ totalAmount?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
1216
+ paidAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
1217
+ remainingAmount?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
1218
+ interestRate?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
1219
+ dueDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1220
+ startDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1221
+ endDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1222
+ activatedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1223
+ completedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1224
+ requiresPreviousPhaseCompletion?: Prisma.BoolFieldUpdateOperationsInput | boolean;
1225
+ minimumCompletionPercentage?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
1226
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
1227
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
1228
+ contract?: Prisma.ContractUpdateOneRequiredWithoutPhasesNestedInput;
1229
+ paymentPlan?: Prisma.PaymentPlanUpdateOneWithoutContractPhasesNestedInput;
1230
+ payments?: Prisma.ContractPaymentUpdateManyWithoutPhaseNestedInput;
1231
+ steps?: Prisma.ContractPhaseStepUpdateManyWithoutPhaseNestedInput;
1232
+ };
1233
+ export type ContractPhaseUncheckedUpdateWithoutInstallmentsInput = {
1234
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
1235
+ contractId?: Prisma.StringFieldUpdateOperationsInput | string;
1236
+ paymentPlanId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1237
+ name?: Prisma.StringFieldUpdateOperationsInput | string;
1238
+ description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1239
+ phaseCategory?: Prisma.StringFieldUpdateOperationsInput | string;
1240
+ phaseType?: Prisma.StringFieldUpdateOperationsInput | string;
1241
+ order?: Prisma.IntFieldUpdateOperationsInput | number;
1242
+ status?: Prisma.StringFieldUpdateOperationsInput | string;
1243
+ totalAmount?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
1244
+ paidAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
1245
+ remainingAmount?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
1246
+ interestRate?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
1247
+ dueDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1248
+ startDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1249
+ endDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1250
+ activatedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1251
+ completedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1252
+ requiresPreviousPhaseCompletion?: Prisma.BoolFieldUpdateOperationsInput | boolean;
1253
+ minimumCompletionPercentage?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
1254
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
1255
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
1256
+ payments?: Prisma.ContractPaymentUncheckedUpdateManyWithoutPhaseNestedInput;
1257
+ steps?: Prisma.ContractPhaseStepUncheckedUpdateManyWithoutPhaseNestedInput;
1258
+ };
1259
+ export type ContractPhaseCreateWithoutPaymentsInput = {
1260
+ id?: string;
1261
+ name: string;
1262
+ description?: string | null;
1263
+ phaseCategory: string;
1264
+ phaseType: string;
1265
+ order: number;
1266
+ status?: string;
1267
+ totalAmount?: number | null;
1268
+ paidAmount?: number;
1269
+ remainingAmount?: number | null;
1270
+ interestRate?: number | null;
1271
+ dueDate?: Date | string | null;
1272
+ startDate?: Date | string | null;
1273
+ endDate?: Date | string | null;
1274
+ activatedAt?: Date | string | null;
1275
+ completedAt?: Date | string | null;
1276
+ requiresPreviousPhaseCompletion?: boolean;
1277
+ minimumCompletionPercentage?: number | null;
1278
+ createdAt?: Date | string;
1279
+ updatedAt?: Date | string;
1280
+ contract: Prisma.ContractCreateNestedOneWithoutPhasesInput;
1281
+ paymentPlan?: Prisma.PaymentPlanCreateNestedOneWithoutContractPhasesInput;
1282
+ installments?: Prisma.ContractInstallmentCreateNestedManyWithoutPhaseInput;
1283
+ steps?: Prisma.ContractPhaseStepCreateNestedManyWithoutPhaseInput;
1284
+ };
1285
+ export type ContractPhaseUncheckedCreateWithoutPaymentsInput = {
1286
+ id?: string;
1287
+ contractId: string;
1288
+ paymentPlanId?: string | null;
1289
+ name: string;
1290
+ description?: string | null;
1291
+ phaseCategory: string;
1292
+ phaseType: string;
1293
+ order: number;
1294
+ status?: string;
1295
+ totalAmount?: number | null;
1296
+ paidAmount?: number;
1297
+ remainingAmount?: number | null;
1298
+ interestRate?: number | null;
1299
+ dueDate?: Date | string | null;
1300
+ startDate?: Date | string | null;
1301
+ endDate?: Date | string | null;
1302
+ activatedAt?: Date | string | null;
1303
+ completedAt?: Date | string | null;
1304
+ requiresPreviousPhaseCompletion?: boolean;
1305
+ minimumCompletionPercentage?: number | null;
1306
+ createdAt?: Date | string;
1307
+ updatedAt?: Date | string;
1308
+ installments?: Prisma.ContractInstallmentUncheckedCreateNestedManyWithoutPhaseInput;
1309
+ steps?: Prisma.ContractPhaseStepUncheckedCreateNestedManyWithoutPhaseInput;
1310
+ };
1311
+ export type ContractPhaseCreateOrConnectWithoutPaymentsInput = {
1312
+ where: Prisma.ContractPhaseWhereUniqueInput;
1313
+ create: Prisma.XOR<Prisma.ContractPhaseCreateWithoutPaymentsInput, Prisma.ContractPhaseUncheckedCreateWithoutPaymentsInput>;
1314
+ };
1315
+ export type ContractPhaseUpsertWithoutPaymentsInput = {
1316
+ update: Prisma.XOR<Prisma.ContractPhaseUpdateWithoutPaymentsInput, Prisma.ContractPhaseUncheckedUpdateWithoutPaymentsInput>;
1317
+ create: Prisma.XOR<Prisma.ContractPhaseCreateWithoutPaymentsInput, Prisma.ContractPhaseUncheckedCreateWithoutPaymentsInput>;
1318
+ where?: Prisma.ContractPhaseWhereInput;
1319
+ };
1320
+ export type ContractPhaseUpdateToOneWithWhereWithoutPaymentsInput = {
1321
+ where?: Prisma.ContractPhaseWhereInput;
1322
+ data: Prisma.XOR<Prisma.ContractPhaseUpdateWithoutPaymentsInput, Prisma.ContractPhaseUncheckedUpdateWithoutPaymentsInput>;
1323
+ };
1324
+ export type ContractPhaseUpdateWithoutPaymentsInput = {
1325
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
1326
+ name?: Prisma.StringFieldUpdateOperationsInput | string;
1327
+ description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1328
+ phaseCategory?: Prisma.StringFieldUpdateOperationsInput | string;
1329
+ phaseType?: Prisma.StringFieldUpdateOperationsInput | string;
1330
+ order?: Prisma.IntFieldUpdateOperationsInput | number;
1331
+ status?: Prisma.StringFieldUpdateOperationsInput | string;
1332
+ totalAmount?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
1333
+ paidAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
1334
+ remainingAmount?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
1335
+ interestRate?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
1336
+ dueDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1337
+ startDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1338
+ endDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1339
+ activatedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1340
+ completedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1341
+ requiresPreviousPhaseCompletion?: Prisma.BoolFieldUpdateOperationsInput | boolean;
1342
+ minimumCompletionPercentage?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
1343
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
1344
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
1345
+ contract?: Prisma.ContractUpdateOneRequiredWithoutPhasesNestedInput;
1346
+ paymentPlan?: Prisma.PaymentPlanUpdateOneWithoutContractPhasesNestedInput;
1347
+ installments?: Prisma.ContractInstallmentUpdateManyWithoutPhaseNestedInput;
1348
+ steps?: Prisma.ContractPhaseStepUpdateManyWithoutPhaseNestedInput;
1349
+ };
1350
+ export type ContractPhaseUncheckedUpdateWithoutPaymentsInput = {
1351
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
1352
+ contractId?: Prisma.StringFieldUpdateOperationsInput | string;
1353
+ paymentPlanId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1354
+ name?: Prisma.StringFieldUpdateOperationsInput | string;
1355
+ description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1356
+ phaseCategory?: Prisma.StringFieldUpdateOperationsInput | string;
1357
+ phaseType?: Prisma.StringFieldUpdateOperationsInput | string;
1358
+ order?: Prisma.IntFieldUpdateOperationsInput | number;
1359
+ status?: Prisma.StringFieldUpdateOperationsInput | string;
1360
+ totalAmount?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
1361
+ paidAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
1362
+ remainingAmount?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
1363
+ interestRate?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
1364
+ dueDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1365
+ startDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1366
+ endDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1367
+ activatedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1368
+ completedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1369
+ requiresPreviousPhaseCompletion?: Prisma.BoolFieldUpdateOperationsInput | boolean;
1370
+ minimumCompletionPercentage?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
1371
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
1372
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
1373
+ installments?: Prisma.ContractInstallmentUncheckedUpdateManyWithoutPhaseNestedInput;
1374
+ steps?: Prisma.ContractPhaseStepUncheckedUpdateManyWithoutPhaseNestedInput;
1375
+ };
1376
+ export type ContractPhaseCreateManyPaymentPlanInput = {
1377
+ id?: string;
1378
+ contractId: string;
1379
+ name: string;
1380
+ description?: string | null;
1381
+ phaseCategory: string;
1382
+ phaseType: string;
1383
+ order: number;
1384
+ status?: string;
1385
+ totalAmount?: number | null;
1386
+ paidAmount?: number;
1387
+ remainingAmount?: number | null;
1388
+ interestRate?: number | null;
1389
+ dueDate?: Date | string | null;
1390
+ startDate?: Date | string | null;
1391
+ endDate?: Date | string | null;
1392
+ activatedAt?: Date | string | null;
1393
+ completedAt?: Date | string | null;
1394
+ requiresPreviousPhaseCompletion?: boolean;
1395
+ minimumCompletionPercentage?: number | null;
1396
+ createdAt?: Date | string;
1397
+ updatedAt?: Date | string;
1398
+ };
1399
+ export type ContractPhaseUpdateWithoutPaymentPlanInput = {
1400
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
1401
+ name?: Prisma.StringFieldUpdateOperationsInput | string;
1402
+ description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1403
+ phaseCategory?: Prisma.StringFieldUpdateOperationsInput | string;
1404
+ phaseType?: Prisma.StringFieldUpdateOperationsInput | string;
1405
+ order?: Prisma.IntFieldUpdateOperationsInput | number;
1406
+ status?: Prisma.StringFieldUpdateOperationsInput | string;
1407
+ totalAmount?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
1408
+ paidAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
1409
+ remainingAmount?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
1410
+ interestRate?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
1411
+ dueDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1412
+ startDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1413
+ endDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1414
+ activatedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1415
+ completedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1416
+ requiresPreviousPhaseCompletion?: Prisma.BoolFieldUpdateOperationsInput | boolean;
1417
+ minimumCompletionPercentage?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
1418
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
1419
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
1420
+ contract?: Prisma.ContractUpdateOneRequiredWithoutPhasesNestedInput;
1421
+ installments?: Prisma.ContractInstallmentUpdateManyWithoutPhaseNestedInput;
1422
+ payments?: Prisma.ContractPaymentUpdateManyWithoutPhaseNestedInput;
1423
+ steps?: Prisma.ContractPhaseStepUpdateManyWithoutPhaseNestedInput;
1424
+ };
1425
+ export type ContractPhaseUncheckedUpdateWithoutPaymentPlanInput = {
1426
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
1427
+ contractId?: Prisma.StringFieldUpdateOperationsInput | string;
1428
+ name?: Prisma.StringFieldUpdateOperationsInput | string;
1429
+ description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1430
+ phaseCategory?: Prisma.StringFieldUpdateOperationsInput | string;
1431
+ phaseType?: Prisma.StringFieldUpdateOperationsInput | string;
1432
+ order?: Prisma.IntFieldUpdateOperationsInput | number;
1433
+ status?: Prisma.StringFieldUpdateOperationsInput | string;
1434
+ totalAmount?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
1435
+ paidAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
1436
+ remainingAmount?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
1437
+ interestRate?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
1438
+ dueDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1439
+ startDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1440
+ endDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1441
+ activatedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1442
+ completedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1443
+ requiresPreviousPhaseCompletion?: Prisma.BoolFieldUpdateOperationsInput | boolean;
1444
+ minimumCompletionPercentage?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
1445
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
1446
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
1447
+ installments?: Prisma.ContractInstallmentUncheckedUpdateManyWithoutPhaseNestedInput;
1448
+ payments?: Prisma.ContractPaymentUncheckedUpdateManyWithoutPhaseNestedInput;
1449
+ steps?: Prisma.ContractPhaseStepUncheckedUpdateManyWithoutPhaseNestedInput;
1450
+ };
1451
+ export type ContractPhaseUncheckedUpdateManyWithoutPaymentPlanInput = {
1452
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
1453
+ contractId?: Prisma.StringFieldUpdateOperationsInput | string;
1454
+ name?: Prisma.StringFieldUpdateOperationsInput | string;
1455
+ description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1456
+ phaseCategory?: Prisma.StringFieldUpdateOperationsInput | string;
1457
+ phaseType?: Prisma.StringFieldUpdateOperationsInput | string;
1458
+ order?: Prisma.IntFieldUpdateOperationsInput | number;
1459
+ status?: Prisma.StringFieldUpdateOperationsInput | string;
1460
+ totalAmount?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
1461
+ paidAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
1462
+ remainingAmount?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
1463
+ interestRate?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
1464
+ dueDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1465
+ startDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1466
+ endDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1467
+ activatedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1468
+ completedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1469
+ requiresPreviousPhaseCompletion?: Prisma.BoolFieldUpdateOperationsInput | boolean;
1470
+ minimumCompletionPercentage?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
1471
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
1472
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
1473
+ };
1474
+ export type ContractPhaseCreateManyContractInput = {
1475
+ id?: string;
1476
+ paymentPlanId?: string | null;
1477
+ name: string;
1478
+ description?: string | null;
1479
+ phaseCategory: string;
1480
+ phaseType: string;
1481
+ order: number;
1482
+ status?: string;
1483
+ totalAmount?: number | null;
1484
+ paidAmount?: number;
1485
+ remainingAmount?: number | null;
1486
+ interestRate?: number | null;
1487
+ dueDate?: Date | string | null;
1488
+ startDate?: Date | string | null;
1489
+ endDate?: Date | string | null;
1490
+ activatedAt?: Date | string | null;
1491
+ completedAt?: Date | string | null;
1492
+ requiresPreviousPhaseCompletion?: boolean;
1493
+ minimumCompletionPercentage?: number | null;
1494
+ createdAt?: Date | string;
1495
+ updatedAt?: Date | string;
1496
+ };
1497
+ export type ContractPhaseUpdateWithoutContractInput = {
1498
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
1499
+ name?: Prisma.StringFieldUpdateOperationsInput | string;
1500
+ description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1501
+ phaseCategory?: Prisma.StringFieldUpdateOperationsInput | string;
1502
+ phaseType?: Prisma.StringFieldUpdateOperationsInput | string;
1503
+ order?: Prisma.IntFieldUpdateOperationsInput | number;
1504
+ status?: Prisma.StringFieldUpdateOperationsInput | string;
1505
+ totalAmount?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
1506
+ paidAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
1507
+ remainingAmount?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
1508
+ interestRate?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
1509
+ dueDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1510
+ startDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1511
+ endDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1512
+ activatedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1513
+ completedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1514
+ requiresPreviousPhaseCompletion?: Prisma.BoolFieldUpdateOperationsInput | boolean;
1515
+ minimumCompletionPercentage?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
1516
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
1517
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
1518
+ paymentPlan?: Prisma.PaymentPlanUpdateOneWithoutContractPhasesNestedInput;
1519
+ installments?: Prisma.ContractInstallmentUpdateManyWithoutPhaseNestedInput;
1520
+ payments?: Prisma.ContractPaymentUpdateManyWithoutPhaseNestedInput;
1521
+ steps?: Prisma.ContractPhaseStepUpdateManyWithoutPhaseNestedInput;
1522
+ };
1523
+ export type ContractPhaseUncheckedUpdateWithoutContractInput = {
1524
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
1525
+ paymentPlanId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1526
+ name?: Prisma.StringFieldUpdateOperationsInput | string;
1527
+ description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1528
+ phaseCategory?: Prisma.StringFieldUpdateOperationsInput | string;
1529
+ phaseType?: Prisma.StringFieldUpdateOperationsInput | string;
1530
+ order?: Prisma.IntFieldUpdateOperationsInput | number;
1531
+ status?: Prisma.StringFieldUpdateOperationsInput | string;
1532
+ totalAmount?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
1533
+ paidAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
1534
+ remainingAmount?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
1535
+ interestRate?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
1536
+ dueDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1537
+ startDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1538
+ endDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1539
+ activatedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1540
+ completedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1541
+ requiresPreviousPhaseCompletion?: Prisma.BoolFieldUpdateOperationsInput | boolean;
1542
+ minimumCompletionPercentage?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
1543
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
1544
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
1545
+ installments?: Prisma.ContractInstallmentUncheckedUpdateManyWithoutPhaseNestedInput;
1546
+ payments?: Prisma.ContractPaymentUncheckedUpdateManyWithoutPhaseNestedInput;
1547
+ steps?: Prisma.ContractPhaseStepUncheckedUpdateManyWithoutPhaseNestedInput;
1548
+ };
1549
+ export type ContractPhaseUncheckedUpdateManyWithoutContractInput = {
1550
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
1551
+ paymentPlanId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1552
+ name?: Prisma.StringFieldUpdateOperationsInput | string;
1553
+ description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1554
+ phaseCategory?: Prisma.StringFieldUpdateOperationsInput | string;
1555
+ phaseType?: Prisma.StringFieldUpdateOperationsInput | string;
1556
+ order?: Prisma.IntFieldUpdateOperationsInput | number;
1557
+ status?: Prisma.StringFieldUpdateOperationsInput | string;
1558
+ totalAmount?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
1559
+ paidAmount?: Prisma.FloatFieldUpdateOperationsInput | number;
1560
+ remainingAmount?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
1561
+ interestRate?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
1562
+ dueDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1563
+ startDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1564
+ endDate?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1565
+ activatedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1566
+ completedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
1567
+ requiresPreviousPhaseCompletion?: Prisma.BoolFieldUpdateOperationsInput | boolean;
1568
+ minimumCompletionPercentage?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null;
1569
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
1570
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
1571
+ };
1572
+ /**
1573
+ * Count Type ContractPhaseCountOutputType
1574
+ */
1575
+ export type ContractPhaseCountOutputType = {
1576
+ installments: number;
1577
+ payments: number;
1578
+ steps: number;
1579
+ };
1580
+ export type ContractPhaseCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1581
+ installments?: boolean | ContractPhaseCountOutputTypeCountInstallmentsArgs;
1582
+ payments?: boolean | ContractPhaseCountOutputTypeCountPaymentsArgs;
1583
+ steps?: boolean | ContractPhaseCountOutputTypeCountStepsArgs;
1584
+ };
1585
+ /**
1586
+ * ContractPhaseCountOutputType without action
1587
+ */
1588
+ export type ContractPhaseCountOutputTypeDefaultArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1589
+ /**
1590
+ * Select specific fields to fetch from the ContractPhaseCountOutputType
1591
+ */
1592
+ select?: Prisma.ContractPhaseCountOutputTypeSelect<ExtArgs> | null;
1593
+ };
1594
+ /**
1595
+ * ContractPhaseCountOutputType without action
1596
+ */
1597
+ export type ContractPhaseCountOutputTypeCountInstallmentsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1598
+ where?: Prisma.ContractInstallmentWhereInput;
1599
+ };
1600
+ /**
1601
+ * ContractPhaseCountOutputType without action
1602
+ */
1603
+ export type ContractPhaseCountOutputTypeCountPaymentsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1604
+ where?: Prisma.ContractPaymentWhereInput;
1605
+ };
1606
+ /**
1607
+ * ContractPhaseCountOutputType without action
1608
+ */
1609
+ export type ContractPhaseCountOutputTypeCountStepsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1610
+ where?: Prisma.ContractPhaseStepWhereInput;
1611
+ };
1612
+ export type ContractPhaseSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
1613
+ id?: boolean;
1614
+ contractId?: boolean;
1615
+ paymentPlanId?: boolean;
1616
+ name?: boolean;
1617
+ description?: boolean;
1618
+ phaseCategory?: boolean;
1619
+ phaseType?: boolean;
1620
+ order?: boolean;
1621
+ status?: boolean;
1622
+ totalAmount?: boolean;
1623
+ paidAmount?: boolean;
1624
+ remainingAmount?: boolean;
1625
+ interestRate?: boolean;
1626
+ dueDate?: boolean;
1627
+ startDate?: boolean;
1628
+ endDate?: boolean;
1629
+ activatedAt?: boolean;
1630
+ completedAt?: boolean;
1631
+ requiresPreviousPhaseCompletion?: boolean;
1632
+ minimumCompletionPercentage?: boolean;
1633
+ createdAt?: boolean;
1634
+ updatedAt?: boolean;
1635
+ contract?: boolean | Prisma.ContractDefaultArgs<ExtArgs>;
1636
+ paymentPlan?: boolean | Prisma.ContractPhase$paymentPlanArgs<ExtArgs>;
1637
+ installments?: boolean | Prisma.ContractPhase$installmentsArgs<ExtArgs>;
1638
+ payments?: boolean | Prisma.ContractPhase$paymentsArgs<ExtArgs>;
1639
+ steps?: boolean | Prisma.ContractPhase$stepsArgs<ExtArgs>;
1640
+ _count?: boolean | Prisma.ContractPhaseCountOutputTypeDefaultArgs<ExtArgs>;
1641
+ }, ExtArgs["result"]["contractPhase"]>;
1642
+ export type ContractPhaseSelectScalar = {
1643
+ id?: boolean;
1644
+ contractId?: boolean;
1645
+ paymentPlanId?: boolean;
1646
+ name?: boolean;
1647
+ description?: boolean;
1648
+ phaseCategory?: boolean;
1649
+ phaseType?: boolean;
1650
+ order?: boolean;
1651
+ status?: boolean;
1652
+ totalAmount?: boolean;
1653
+ paidAmount?: boolean;
1654
+ remainingAmount?: boolean;
1655
+ interestRate?: boolean;
1656
+ dueDate?: boolean;
1657
+ startDate?: boolean;
1658
+ endDate?: boolean;
1659
+ activatedAt?: boolean;
1660
+ completedAt?: boolean;
1661
+ requiresPreviousPhaseCompletion?: boolean;
1662
+ minimumCompletionPercentage?: boolean;
1663
+ createdAt?: boolean;
1664
+ updatedAt?: boolean;
1665
+ };
1666
+ export type ContractPhaseOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "contractId" | "paymentPlanId" | "name" | "description" | "phaseCategory" | "phaseType" | "order" | "status" | "totalAmount" | "paidAmount" | "remainingAmount" | "interestRate" | "dueDate" | "startDate" | "endDate" | "activatedAt" | "completedAt" | "requiresPreviousPhaseCompletion" | "minimumCompletionPercentage" | "createdAt" | "updatedAt", ExtArgs["result"]["contractPhase"]>;
1667
+ export type ContractPhaseInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1668
+ contract?: boolean | Prisma.ContractDefaultArgs<ExtArgs>;
1669
+ paymentPlan?: boolean | Prisma.ContractPhase$paymentPlanArgs<ExtArgs>;
1670
+ installments?: boolean | Prisma.ContractPhase$installmentsArgs<ExtArgs>;
1671
+ payments?: boolean | Prisma.ContractPhase$paymentsArgs<ExtArgs>;
1672
+ steps?: boolean | Prisma.ContractPhase$stepsArgs<ExtArgs>;
1673
+ _count?: boolean | Prisma.ContractPhaseCountOutputTypeDefaultArgs<ExtArgs>;
1674
+ };
1675
+ export type $ContractPhasePayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1676
+ name: "ContractPhase";
1677
+ objects: {
1678
+ contract: Prisma.$ContractPayload<ExtArgs>;
1679
+ paymentPlan: Prisma.$PaymentPlanPayload<ExtArgs> | null;
1680
+ installments: Prisma.$ContractInstallmentPayload<ExtArgs>[];
1681
+ payments: Prisma.$ContractPaymentPayload<ExtArgs>[];
1682
+ steps: Prisma.$ContractPhaseStepPayload<ExtArgs>[];
1683
+ };
1684
+ scalars: runtime.Types.Extensions.GetPayloadResult<{
1685
+ id: string;
1686
+ contractId: string;
1687
+ paymentPlanId: string | null;
1688
+ name: string;
1689
+ description: string | null;
1690
+ phaseCategory: string;
1691
+ phaseType: string;
1692
+ order: number;
1693
+ status: string;
1694
+ totalAmount: number | null;
1695
+ paidAmount: number;
1696
+ remainingAmount: number | null;
1697
+ interestRate: number | null;
1698
+ dueDate: Date | null;
1699
+ startDate: Date | null;
1700
+ endDate: Date | null;
1701
+ activatedAt: Date | null;
1702
+ completedAt: Date | null;
1703
+ requiresPreviousPhaseCompletion: boolean;
1704
+ minimumCompletionPercentage: number | null;
1705
+ createdAt: Date;
1706
+ updatedAt: Date;
1707
+ }, ExtArgs["result"]["contractPhase"]>;
1708
+ composites: {};
1709
+ };
1710
+ export type ContractPhaseGetPayload<S extends boolean | null | undefined | ContractPhaseDefaultArgs> = runtime.Types.Result.GetResult<Prisma.$ContractPhasePayload, S>;
1711
+ export type ContractPhaseCountArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = Omit<ContractPhaseFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
1712
+ select?: ContractPhaseCountAggregateInputType | true;
1713
+ };
1714
+ export interface ContractPhaseDelegate<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> {
1715
+ [K: symbol]: {
1716
+ types: Prisma.TypeMap<ExtArgs>['model']['ContractPhase'];
1717
+ meta: {
1718
+ name: 'ContractPhase';
1719
+ };
1720
+ };
1721
+ /**
1722
+ * Find zero or one ContractPhase that matches the filter.
1723
+ * @param {ContractPhaseFindUniqueArgs} args - Arguments to find a ContractPhase
1724
+ * @example
1725
+ * // Get one ContractPhase
1726
+ * const contractPhase = await prisma.contractPhase.findUnique({
1727
+ * where: {
1728
+ * // ... provide filter here
1729
+ * }
1730
+ * })
1731
+ */
1732
+ findUnique<T extends ContractPhaseFindUniqueArgs>(args: Prisma.SelectSubset<T, ContractPhaseFindUniqueArgs<ExtArgs>>): Prisma.Prisma__ContractPhaseClient<runtime.Types.Result.GetResult<Prisma.$ContractPhasePayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>;
1733
+ /**
1734
+ * Find one ContractPhase that matches the filter or throw an error with `error.code='P2025'`
1735
+ * if no matches were found.
1736
+ * @param {ContractPhaseFindUniqueOrThrowArgs} args - Arguments to find a ContractPhase
1737
+ * @example
1738
+ * // Get one ContractPhase
1739
+ * const contractPhase = await prisma.contractPhase.findUniqueOrThrow({
1740
+ * where: {
1741
+ * // ... provide filter here
1742
+ * }
1743
+ * })
1744
+ */
1745
+ findUniqueOrThrow<T extends ContractPhaseFindUniqueOrThrowArgs>(args: Prisma.SelectSubset<T, ContractPhaseFindUniqueOrThrowArgs<ExtArgs>>): Prisma.Prisma__ContractPhaseClient<runtime.Types.Result.GetResult<Prisma.$ContractPhasePayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
1746
+ /**
1747
+ * Find the first ContractPhase that matches the filter.
1748
+ * Note, that providing `undefined` is treated as the value not being there.
1749
+ * Read more here: https://pris.ly/d/null-undefined
1750
+ * @param {ContractPhaseFindFirstArgs} args - Arguments to find a ContractPhase
1751
+ * @example
1752
+ * // Get one ContractPhase
1753
+ * const contractPhase = await prisma.contractPhase.findFirst({
1754
+ * where: {
1755
+ * // ... provide filter here
1756
+ * }
1757
+ * })
1758
+ */
1759
+ findFirst<T extends ContractPhaseFindFirstArgs>(args?: Prisma.SelectSubset<T, ContractPhaseFindFirstArgs<ExtArgs>>): Prisma.Prisma__ContractPhaseClient<runtime.Types.Result.GetResult<Prisma.$ContractPhasePayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>;
1760
+ /**
1761
+ * Find the first ContractPhase that matches the filter or
1762
+ * throw `PrismaKnownClientError` with `P2025` code if no matches were found.
1763
+ * Note, that providing `undefined` is treated as the value not being there.
1764
+ * Read more here: https://pris.ly/d/null-undefined
1765
+ * @param {ContractPhaseFindFirstOrThrowArgs} args - Arguments to find a ContractPhase
1766
+ * @example
1767
+ * // Get one ContractPhase
1768
+ * const contractPhase = await prisma.contractPhase.findFirstOrThrow({
1769
+ * where: {
1770
+ * // ... provide filter here
1771
+ * }
1772
+ * })
1773
+ */
1774
+ findFirstOrThrow<T extends ContractPhaseFindFirstOrThrowArgs>(args?: Prisma.SelectSubset<T, ContractPhaseFindFirstOrThrowArgs<ExtArgs>>): Prisma.Prisma__ContractPhaseClient<runtime.Types.Result.GetResult<Prisma.$ContractPhasePayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
1775
+ /**
1776
+ * Find zero or more ContractPhases that matches the filter.
1777
+ * Note, that providing `undefined` is treated as the value not being there.
1778
+ * Read more here: https://pris.ly/d/null-undefined
1779
+ * @param {ContractPhaseFindManyArgs} args - Arguments to filter and select certain fields only.
1780
+ * @example
1781
+ * // Get all ContractPhases
1782
+ * const contractPhases = await prisma.contractPhase.findMany()
1783
+ *
1784
+ * // Get first 10 ContractPhases
1785
+ * const contractPhases = await prisma.contractPhase.findMany({ take: 10 })
1786
+ *
1787
+ * // Only select the `id`
1788
+ * const contractPhaseWithIdOnly = await prisma.contractPhase.findMany({ select: { id: true } })
1789
+ *
1790
+ */
1791
+ findMany<T extends ContractPhaseFindManyArgs>(args?: Prisma.SelectSubset<T, ContractPhaseFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$ContractPhasePayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>;
1792
+ /**
1793
+ * Create a ContractPhase.
1794
+ * @param {ContractPhaseCreateArgs} args - Arguments to create a ContractPhase.
1795
+ * @example
1796
+ * // Create one ContractPhase
1797
+ * const ContractPhase = await prisma.contractPhase.create({
1798
+ * data: {
1799
+ * // ... data to create a ContractPhase
1800
+ * }
1801
+ * })
1802
+ *
1803
+ */
1804
+ create<T extends ContractPhaseCreateArgs>(args: Prisma.SelectSubset<T, ContractPhaseCreateArgs<ExtArgs>>): Prisma.Prisma__ContractPhaseClient<runtime.Types.Result.GetResult<Prisma.$ContractPhasePayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
1805
+ /**
1806
+ * Create many ContractPhases.
1807
+ * @param {ContractPhaseCreateManyArgs} args - Arguments to create many ContractPhases.
1808
+ * @example
1809
+ * // Create many ContractPhases
1810
+ * const contractPhase = await prisma.contractPhase.createMany({
1811
+ * data: [
1812
+ * // ... provide data here
1813
+ * ]
1814
+ * })
1815
+ *
1816
+ */
1817
+ createMany<T extends ContractPhaseCreateManyArgs>(args?: Prisma.SelectSubset<T, ContractPhaseCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>;
1818
+ /**
1819
+ * Delete a ContractPhase.
1820
+ * @param {ContractPhaseDeleteArgs} args - Arguments to delete one ContractPhase.
1821
+ * @example
1822
+ * // Delete one ContractPhase
1823
+ * const ContractPhase = await prisma.contractPhase.delete({
1824
+ * where: {
1825
+ * // ... filter to delete one ContractPhase
1826
+ * }
1827
+ * })
1828
+ *
1829
+ */
1830
+ delete<T extends ContractPhaseDeleteArgs>(args: Prisma.SelectSubset<T, ContractPhaseDeleteArgs<ExtArgs>>): Prisma.Prisma__ContractPhaseClient<runtime.Types.Result.GetResult<Prisma.$ContractPhasePayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
1831
+ /**
1832
+ * Update one ContractPhase.
1833
+ * @param {ContractPhaseUpdateArgs} args - Arguments to update one ContractPhase.
1834
+ * @example
1835
+ * // Update one ContractPhase
1836
+ * const contractPhase = await prisma.contractPhase.update({
1837
+ * where: {
1838
+ * // ... provide filter here
1839
+ * },
1840
+ * data: {
1841
+ * // ... provide data here
1842
+ * }
1843
+ * })
1844
+ *
1845
+ */
1846
+ update<T extends ContractPhaseUpdateArgs>(args: Prisma.SelectSubset<T, ContractPhaseUpdateArgs<ExtArgs>>): Prisma.Prisma__ContractPhaseClient<runtime.Types.Result.GetResult<Prisma.$ContractPhasePayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
1847
+ /**
1848
+ * Delete zero or more ContractPhases.
1849
+ * @param {ContractPhaseDeleteManyArgs} args - Arguments to filter ContractPhases to delete.
1850
+ * @example
1851
+ * // Delete a few ContractPhases
1852
+ * const { count } = await prisma.contractPhase.deleteMany({
1853
+ * where: {
1854
+ * // ... provide filter here
1855
+ * }
1856
+ * })
1857
+ *
1858
+ */
1859
+ deleteMany<T extends ContractPhaseDeleteManyArgs>(args?: Prisma.SelectSubset<T, ContractPhaseDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>;
1860
+ /**
1861
+ * Update zero or more ContractPhases.
1862
+ * Note, that providing `undefined` is treated as the value not being there.
1863
+ * Read more here: https://pris.ly/d/null-undefined
1864
+ * @param {ContractPhaseUpdateManyArgs} args - Arguments to update one or more rows.
1865
+ * @example
1866
+ * // Update many ContractPhases
1867
+ * const contractPhase = await prisma.contractPhase.updateMany({
1868
+ * where: {
1869
+ * // ... provide filter here
1870
+ * },
1871
+ * data: {
1872
+ * // ... provide data here
1873
+ * }
1874
+ * })
1875
+ *
1876
+ */
1877
+ updateMany<T extends ContractPhaseUpdateManyArgs>(args: Prisma.SelectSubset<T, ContractPhaseUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>;
1878
+ /**
1879
+ * Create or update one ContractPhase.
1880
+ * @param {ContractPhaseUpsertArgs} args - Arguments to update or create a ContractPhase.
1881
+ * @example
1882
+ * // Update or create a ContractPhase
1883
+ * const contractPhase = await prisma.contractPhase.upsert({
1884
+ * create: {
1885
+ * // ... data to create a ContractPhase
1886
+ * },
1887
+ * update: {
1888
+ * // ... in case it already exists, update
1889
+ * },
1890
+ * where: {
1891
+ * // ... the filter for the ContractPhase we want to update
1892
+ * }
1893
+ * })
1894
+ */
1895
+ upsert<T extends ContractPhaseUpsertArgs>(args: Prisma.SelectSubset<T, ContractPhaseUpsertArgs<ExtArgs>>): Prisma.Prisma__ContractPhaseClient<runtime.Types.Result.GetResult<Prisma.$ContractPhasePayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
1896
+ /**
1897
+ * Count the number of ContractPhases.
1898
+ * Note, that providing `undefined` is treated as the value not being there.
1899
+ * Read more here: https://pris.ly/d/null-undefined
1900
+ * @param {ContractPhaseCountArgs} args - Arguments to filter ContractPhases to count.
1901
+ * @example
1902
+ * // Count the number of ContractPhases
1903
+ * const count = await prisma.contractPhase.count({
1904
+ * where: {
1905
+ * // ... the filter for the ContractPhases we want to count
1906
+ * }
1907
+ * })
1908
+ **/
1909
+ count<T extends ContractPhaseCountArgs>(args?: Prisma.Subset<T, ContractPhaseCountArgs>): Prisma.PrismaPromise<T extends runtime.Types.Utils.Record<'select', any> ? T['select'] extends true ? number : Prisma.GetScalarType<T['select'], ContractPhaseCountAggregateOutputType> : number>;
1910
+ /**
1911
+ * Allows you to perform aggregations operations on a ContractPhase.
1912
+ * Note, that providing `undefined` is treated as the value not being there.
1913
+ * Read more here: https://pris.ly/d/null-undefined
1914
+ * @param {ContractPhaseAggregateArgs} args - Select which aggregations you would like to apply and on what fields.
1915
+ * @example
1916
+ * // Ordered by age ascending
1917
+ * // Where email contains prisma.io
1918
+ * // Limited to the 10 users
1919
+ * const aggregations = await prisma.user.aggregate({
1920
+ * _avg: {
1921
+ * age: true,
1922
+ * },
1923
+ * where: {
1924
+ * email: {
1925
+ * contains: "prisma.io",
1926
+ * },
1927
+ * },
1928
+ * orderBy: {
1929
+ * age: "asc",
1930
+ * },
1931
+ * take: 10,
1932
+ * })
1933
+ **/
1934
+ aggregate<T extends ContractPhaseAggregateArgs>(args: Prisma.Subset<T, ContractPhaseAggregateArgs>): Prisma.PrismaPromise<GetContractPhaseAggregateType<T>>;
1935
+ /**
1936
+ * Group by ContractPhase.
1937
+ * Note, that providing `undefined` is treated as the value not being there.
1938
+ * Read more here: https://pris.ly/d/null-undefined
1939
+ * @param {ContractPhaseGroupByArgs} args - Group by arguments.
1940
+ * @example
1941
+ * // Group by city, order by createdAt, get count
1942
+ * const result = await prisma.user.groupBy({
1943
+ * by: ['city', 'createdAt'],
1944
+ * orderBy: {
1945
+ * createdAt: true
1946
+ * },
1947
+ * _count: {
1948
+ * _all: true
1949
+ * },
1950
+ * })
1951
+ *
1952
+ **/
1953
+ groupBy<T extends ContractPhaseGroupByArgs, HasSelectOrTake extends Prisma.Or<Prisma.Extends<'skip', Prisma.Keys<T>>, Prisma.Extends<'take', Prisma.Keys<T>>>, OrderByArg extends Prisma.True extends HasSelectOrTake ? {
1954
+ orderBy: ContractPhaseGroupByArgs['orderBy'];
1955
+ } : {
1956
+ orderBy?: ContractPhaseGroupByArgs['orderBy'];
1957
+ }, OrderFields extends Prisma.ExcludeUnderscoreKeys<Prisma.Keys<Prisma.MaybeTupleToUnion<T['orderBy']>>>, ByFields extends Prisma.MaybeTupleToUnion<T['by']>, ByValid extends Prisma.Has<ByFields, OrderFields>, HavingFields extends Prisma.GetHavingFields<T['having']>, HavingValid extends Prisma.Has<ByFields, HavingFields>, ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, InputErrors extends ByEmpty extends Prisma.True ? `Error: "by" must not be empty.` : HavingValid extends Prisma.False ? {
1958
+ [P in HavingFields]: P extends ByFields ? never : P extends string ? `Error: Field "${P}" used in "having" needs to be provided in "by".` : [
1959
+ Error,
1960
+ 'Field ',
1961
+ P,
1962
+ ` in "having" needs to be provided in "by"`
1963
+ ];
1964
+ }[HavingFields] : 'take' extends Prisma.Keys<T> ? 'orderBy' extends Prisma.Keys<T> ? ByValid extends Prisma.True ? {} : {
1965
+ [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`;
1966
+ }[OrderFields] : 'Error: If you provide "take", you also need to provide "orderBy"' : 'skip' extends Prisma.Keys<T> ? 'orderBy' extends Prisma.Keys<T> ? ByValid extends Prisma.True ? {} : {
1967
+ [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`;
1968
+ }[OrderFields] : 'Error: If you provide "skip", you also need to provide "orderBy"' : ByValid extends Prisma.True ? {} : {
1969
+ [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`;
1970
+ }[OrderFields]>(args: Prisma.SubsetIntersection<T, ContractPhaseGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetContractPhaseGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>;
1971
+ /**
1972
+ * Fields of the ContractPhase model
1973
+ */
1974
+ readonly fields: ContractPhaseFieldRefs;
1975
+ }
1976
+ /**
1977
+ * The delegate class that acts as a "Promise-like" for ContractPhase.
1978
+ * Why is this prefixed with `Prisma__`?
1979
+ * Because we want to prevent naming conflicts as mentioned in
1980
+ * https://github.com/prisma/prisma-client-js/issues/707
1981
+ */
1982
+ export interface Prisma__ContractPhaseClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
1983
+ readonly [Symbol.toStringTag]: "PrismaPromise";
1984
+ contract<T extends Prisma.ContractDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.ContractDefaultArgs<ExtArgs>>): Prisma.Prisma__ContractClient<runtime.Types.Result.GetResult<Prisma.$ContractPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>;
1985
+ paymentPlan<T extends Prisma.ContractPhase$paymentPlanArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.ContractPhase$paymentPlanArgs<ExtArgs>>): Prisma.Prisma__PaymentPlanClient<runtime.Types.Result.GetResult<Prisma.$PaymentPlanPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>;
1986
+ installments<T extends Prisma.ContractPhase$installmentsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.ContractPhase$installmentsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$ContractInstallmentPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>;
1987
+ payments<T extends Prisma.ContractPhase$paymentsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.ContractPhase$paymentsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$ContractPaymentPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>;
1988
+ steps<T extends Prisma.ContractPhase$stepsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.ContractPhase$stepsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$ContractPhaseStepPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>;
1989
+ /**
1990
+ * Attaches callbacks for the resolution and/or rejection of the Promise.
1991
+ * @param onfulfilled The callback to execute when the Promise is resolved.
1992
+ * @param onrejected The callback to execute when the Promise is rejected.
1993
+ * @returns A Promise for the completion of which ever callback is executed.
1994
+ */
1995
+ then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): runtime.Types.Utils.JsPromise<TResult1 | TResult2>;
1996
+ /**
1997
+ * Attaches a callback for only the rejection of the Promise.
1998
+ * @param onrejected The callback to execute when the Promise is rejected.
1999
+ * @returns A Promise for the completion of the callback.
2000
+ */
2001
+ catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): runtime.Types.Utils.JsPromise<T | TResult>;
2002
+ /**
2003
+ * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The
2004
+ * resolved value cannot be modified from the callback.
2005
+ * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
2006
+ * @returns A Promise for the completion of the callback.
2007
+ */
2008
+ finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise<T>;
2009
+ }
2010
+ /**
2011
+ * Fields of the ContractPhase model
2012
+ */
2013
+ export interface ContractPhaseFieldRefs {
2014
+ readonly id: Prisma.FieldRef<"ContractPhase", 'String'>;
2015
+ readonly contractId: Prisma.FieldRef<"ContractPhase", 'String'>;
2016
+ readonly paymentPlanId: Prisma.FieldRef<"ContractPhase", 'String'>;
2017
+ readonly name: Prisma.FieldRef<"ContractPhase", 'String'>;
2018
+ readonly description: Prisma.FieldRef<"ContractPhase", 'String'>;
2019
+ readonly phaseCategory: Prisma.FieldRef<"ContractPhase", 'String'>;
2020
+ readonly phaseType: Prisma.FieldRef<"ContractPhase", 'String'>;
2021
+ readonly order: Prisma.FieldRef<"ContractPhase", 'Int'>;
2022
+ readonly status: Prisma.FieldRef<"ContractPhase", 'String'>;
2023
+ readonly totalAmount: Prisma.FieldRef<"ContractPhase", 'Float'>;
2024
+ readonly paidAmount: Prisma.FieldRef<"ContractPhase", 'Float'>;
2025
+ readonly remainingAmount: Prisma.FieldRef<"ContractPhase", 'Float'>;
2026
+ readonly interestRate: Prisma.FieldRef<"ContractPhase", 'Float'>;
2027
+ readonly dueDate: Prisma.FieldRef<"ContractPhase", 'DateTime'>;
2028
+ readonly startDate: Prisma.FieldRef<"ContractPhase", 'DateTime'>;
2029
+ readonly endDate: Prisma.FieldRef<"ContractPhase", 'DateTime'>;
2030
+ readonly activatedAt: Prisma.FieldRef<"ContractPhase", 'DateTime'>;
2031
+ readonly completedAt: Prisma.FieldRef<"ContractPhase", 'DateTime'>;
2032
+ readonly requiresPreviousPhaseCompletion: Prisma.FieldRef<"ContractPhase", 'Boolean'>;
2033
+ readonly minimumCompletionPercentage: Prisma.FieldRef<"ContractPhase", 'Float'>;
2034
+ readonly createdAt: Prisma.FieldRef<"ContractPhase", 'DateTime'>;
2035
+ readonly updatedAt: Prisma.FieldRef<"ContractPhase", 'DateTime'>;
2036
+ }
2037
+ /**
2038
+ * ContractPhase findUnique
2039
+ */
2040
+ export type ContractPhaseFindUniqueArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
2041
+ /**
2042
+ * Select specific fields to fetch from the ContractPhase
2043
+ */
2044
+ select?: Prisma.ContractPhaseSelect<ExtArgs> | null;
2045
+ /**
2046
+ * Omit specific fields from the ContractPhase
2047
+ */
2048
+ omit?: Prisma.ContractPhaseOmit<ExtArgs> | null;
2049
+ /**
2050
+ * Choose, which related nodes to fetch as well
2051
+ */
2052
+ include?: Prisma.ContractPhaseInclude<ExtArgs> | null;
2053
+ /**
2054
+ * Filter, which ContractPhase to fetch.
2055
+ */
2056
+ where: Prisma.ContractPhaseWhereUniqueInput;
2057
+ };
2058
+ /**
2059
+ * ContractPhase findUniqueOrThrow
2060
+ */
2061
+ export type ContractPhaseFindUniqueOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
2062
+ /**
2063
+ * Select specific fields to fetch from the ContractPhase
2064
+ */
2065
+ select?: Prisma.ContractPhaseSelect<ExtArgs> | null;
2066
+ /**
2067
+ * Omit specific fields from the ContractPhase
2068
+ */
2069
+ omit?: Prisma.ContractPhaseOmit<ExtArgs> | null;
2070
+ /**
2071
+ * Choose, which related nodes to fetch as well
2072
+ */
2073
+ include?: Prisma.ContractPhaseInclude<ExtArgs> | null;
2074
+ /**
2075
+ * Filter, which ContractPhase to fetch.
2076
+ */
2077
+ where: Prisma.ContractPhaseWhereUniqueInput;
2078
+ };
2079
+ /**
2080
+ * ContractPhase findFirst
2081
+ */
2082
+ export type ContractPhaseFindFirstArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
2083
+ /**
2084
+ * Select specific fields to fetch from the ContractPhase
2085
+ */
2086
+ select?: Prisma.ContractPhaseSelect<ExtArgs> | null;
2087
+ /**
2088
+ * Omit specific fields from the ContractPhase
2089
+ */
2090
+ omit?: Prisma.ContractPhaseOmit<ExtArgs> | null;
2091
+ /**
2092
+ * Choose, which related nodes to fetch as well
2093
+ */
2094
+ include?: Prisma.ContractPhaseInclude<ExtArgs> | null;
2095
+ /**
2096
+ * Filter, which ContractPhase to fetch.
2097
+ */
2098
+ where?: Prisma.ContractPhaseWhereInput;
2099
+ /**
2100
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
2101
+ *
2102
+ * Determine the order of ContractPhases to fetch.
2103
+ */
2104
+ orderBy?: Prisma.ContractPhaseOrderByWithRelationInput | Prisma.ContractPhaseOrderByWithRelationInput[];
2105
+ /**
2106
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
2107
+ *
2108
+ * Sets the position for searching for ContractPhases.
2109
+ */
2110
+ cursor?: Prisma.ContractPhaseWhereUniqueInput;
2111
+ /**
2112
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
2113
+ *
2114
+ * Take `±n` ContractPhases from the position of the cursor.
2115
+ */
2116
+ take?: number;
2117
+ /**
2118
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
2119
+ *
2120
+ * Skip the first `n` ContractPhases.
2121
+ */
2122
+ skip?: number;
2123
+ /**
2124
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
2125
+ *
2126
+ * Filter by unique combinations of ContractPhases.
2127
+ */
2128
+ distinct?: Prisma.ContractPhaseScalarFieldEnum | Prisma.ContractPhaseScalarFieldEnum[];
2129
+ };
2130
+ /**
2131
+ * ContractPhase findFirstOrThrow
2132
+ */
2133
+ export type ContractPhaseFindFirstOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
2134
+ /**
2135
+ * Select specific fields to fetch from the ContractPhase
2136
+ */
2137
+ select?: Prisma.ContractPhaseSelect<ExtArgs> | null;
2138
+ /**
2139
+ * Omit specific fields from the ContractPhase
2140
+ */
2141
+ omit?: Prisma.ContractPhaseOmit<ExtArgs> | null;
2142
+ /**
2143
+ * Choose, which related nodes to fetch as well
2144
+ */
2145
+ include?: Prisma.ContractPhaseInclude<ExtArgs> | null;
2146
+ /**
2147
+ * Filter, which ContractPhase to fetch.
2148
+ */
2149
+ where?: Prisma.ContractPhaseWhereInput;
2150
+ /**
2151
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
2152
+ *
2153
+ * Determine the order of ContractPhases to fetch.
2154
+ */
2155
+ orderBy?: Prisma.ContractPhaseOrderByWithRelationInput | Prisma.ContractPhaseOrderByWithRelationInput[];
2156
+ /**
2157
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
2158
+ *
2159
+ * Sets the position for searching for ContractPhases.
2160
+ */
2161
+ cursor?: Prisma.ContractPhaseWhereUniqueInput;
2162
+ /**
2163
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
2164
+ *
2165
+ * Take `±n` ContractPhases from the position of the cursor.
2166
+ */
2167
+ take?: number;
2168
+ /**
2169
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
2170
+ *
2171
+ * Skip the first `n` ContractPhases.
2172
+ */
2173
+ skip?: number;
2174
+ /**
2175
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
2176
+ *
2177
+ * Filter by unique combinations of ContractPhases.
2178
+ */
2179
+ distinct?: Prisma.ContractPhaseScalarFieldEnum | Prisma.ContractPhaseScalarFieldEnum[];
2180
+ };
2181
+ /**
2182
+ * ContractPhase findMany
2183
+ */
2184
+ export type ContractPhaseFindManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
2185
+ /**
2186
+ * Select specific fields to fetch from the ContractPhase
2187
+ */
2188
+ select?: Prisma.ContractPhaseSelect<ExtArgs> | null;
2189
+ /**
2190
+ * Omit specific fields from the ContractPhase
2191
+ */
2192
+ omit?: Prisma.ContractPhaseOmit<ExtArgs> | null;
2193
+ /**
2194
+ * Choose, which related nodes to fetch as well
2195
+ */
2196
+ include?: Prisma.ContractPhaseInclude<ExtArgs> | null;
2197
+ /**
2198
+ * Filter, which ContractPhases to fetch.
2199
+ */
2200
+ where?: Prisma.ContractPhaseWhereInput;
2201
+ /**
2202
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
2203
+ *
2204
+ * Determine the order of ContractPhases to fetch.
2205
+ */
2206
+ orderBy?: Prisma.ContractPhaseOrderByWithRelationInput | Prisma.ContractPhaseOrderByWithRelationInput[];
2207
+ /**
2208
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
2209
+ *
2210
+ * Sets the position for listing ContractPhases.
2211
+ */
2212
+ cursor?: Prisma.ContractPhaseWhereUniqueInput;
2213
+ /**
2214
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
2215
+ *
2216
+ * Take `±n` ContractPhases from the position of the cursor.
2217
+ */
2218
+ take?: number;
2219
+ /**
2220
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
2221
+ *
2222
+ * Skip the first `n` ContractPhases.
2223
+ */
2224
+ skip?: number;
2225
+ distinct?: Prisma.ContractPhaseScalarFieldEnum | Prisma.ContractPhaseScalarFieldEnum[];
2226
+ };
2227
+ /**
2228
+ * ContractPhase create
2229
+ */
2230
+ export type ContractPhaseCreateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
2231
+ /**
2232
+ * Select specific fields to fetch from the ContractPhase
2233
+ */
2234
+ select?: Prisma.ContractPhaseSelect<ExtArgs> | null;
2235
+ /**
2236
+ * Omit specific fields from the ContractPhase
2237
+ */
2238
+ omit?: Prisma.ContractPhaseOmit<ExtArgs> | null;
2239
+ /**
2240
+ * Choose, which related nodes to fetch as well
2241
+ */
2242
+ include?: Prisma.ContractPhaseInclude<ExtArgs> | null;
2243
+ /**
2244
+ * The data needed to create a ContractPhase.
2245
+ */
2246
+ data: Prisma.XOR<Prisma.ContractPhaseCreateInput, Prisma.ContractPhaseUncheckedCreateInput>;
2247
+ };
2248
+ /**
2249
+ * ContractPhase createMany
2250
+ */
2251
+ export type ContractPhaseCreateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
2252
+ /**
2253
+ * The data used to create many ContractPhases.
2254
+ */
2255
+ data: Prisma.ContractPhaseCreateManyInput | Prisma.ContractPhaseCreateManyInput[];
2256
+ skipDuplicates?: boolean;
2257
+ };
2258
+ /**
2259
+ * ContractPhase update
2260
+ */
2261
+ export type ContractPhaseUpdateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
2262
+ /**
2263
+ * Select specific fields to fetch from the ContractPhase
2264
+ */
2265
+ select?: Prisma.ContractPhaseSelect<ExtArgs> | null;
2266
+ /**
2267
+ * Omit specific fields from the ContractPhase
2268
+ */
2269
+ omit?: Prisma.ContractPhaseOmit<ExtArgs> | null;
2270
+ /**
2271
+ * Choose, which related nodes to fetch as well
2272
+ */
2273
+ include?: Prisma.ContractPhaseInclude<ExtArgs> | null;
2274
+ /**
2275
+ * The data needed to update a ContractPhase.
2276
+ */
2277
+ data: Prisma.XOR<Prisma.ContractPhaseUpdateInput, Prisma.ContractPhaseUncheckedUpdateInput>;
2278
+ /**
2279
+ * Choose, which ContractPhase to update.
2280
+ */
2281
+ where: Prisma.ContractPhaseWhereUniqueInput;
2282
+ };
2283
+ /**
2284
+ * ContractPhase updateMany
2285
+ */
2286
+ export type ContractPhaseUpdateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
2287
+ /**
2288
+ * The data used to update ContractPhases.
2289
+ */
2290
+ data: Prisma.XOR<Prisma.ContractPhaseUpdateManyMutationInput, Prisma.ContractPhaseUncheckedUpdateManyInput>;
2291
+ /**
2292
+ * Filter which ContractPhases to update
2293
+ */
2294
+ where?: Prisma.ContractPhaseWhereInput;
2295
+ /**
2296
+ * Limit how many ContractPhases to update.
2297
+ */
2298
+ limit?: number;
2299
+ };
2300
+ /**
2301
+ * ContractPhase upsert
2302
+ */
2303
+ export type ContractPhaseUpsertArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
2304
+ /**
2305
+ * Select specific fields to fetch from the ContractPhase
2306
+ */
2307
+ select?: Prisma.ContractPhaseSelect<ExtArgs> | null;
2308
+ /**
2309
+ * Omit specific fields from the ContractPhase
2310
+ */
2311
+ omit?: Prisma.ContractPhaseOmit<ExtArgs> | null;
2312
+ /**
2313
+ * Choose, which related nodes to fetch as well
2314
+ */
2315
+ include?: Prisma.ContractPhaseInclude<ExtArgs> | null;
2316
+ /**
2317
+ * The filter to search for the ContractPhase to update in case it exists.
2318
+ */
2319
+ where: Prisma.ContractPhaseWhereUniqueInput;
2320
+ /**
2321
+ * In case the ContractPhase found by the `where` argument doesn't exist, create a new ContractPhase with this data.
2322
+ */
2323
+ create: Prisma.XOR<Prisma.ContractPhaseCreateInput, Prisma.ContractPhaseUncheckedCreateInput>;
2324
+ /**
2325
+ * In case the ContractPhase was found with the provided `where` argument, update it with this data.
2326
+ */
2327
+ update: Prisma.XOR<Prisma.ContractPhaseUpdateInput, Prisma.ContractPhaseUncheckedUpdateInput>;
2328
+ };
2329
+ /**
2330
+ * ContractPhase delete
2331
+ */
2332
+ export type ContractPhaseDeleteArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
2333
+ /**
2334
+ * Select specific fields to fetch from the ContractPhase
2335
+ */
2336
+ select?: Prisma.ContractPhaseSelect<ExtArgs> | null;
2337
+ /**
2338
+ * Omit specific fields from the ContractPhase
2339
+ */
2340
+ omit?: Prisma.ContractPhaseOmit<ExtArgs> | null;
2341
+ /**
2342
+ * Choose, which related nodes to fetch as well
2343
+ */
2344
+ include?: Prisma.ContractPhaseInclude<ExtArgs> | null;
2345
+ /**
2346
+ * Filter which ContractPhase to delete.
2347
+ */
2348
+ where: Prisma.ContractPhaseWhereUniqueInput;
2349
+ };
2350
+ /**
2351
+ * ContractPhase deleteMany
2352
+ */
2353
+ export type ContractPhaseDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
2354
+ /**
2355
+ * Filter which ContractPhases to delete
2356
+ */
2357
+ where?: Prisma.ContractPhaseWhereInput;
2358
+ /**
2359
+ * Limit how many ContractPhases to delete.
2360
+ */
2361
+ limit?: number;
2362
+ };
2363
+ /**
2364
+ * ContractPhase.paymentPlan
2365
+ */
2366
+ export type ContractPhase$paymentPlanArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
2367
+ /**
2368
+ * Select specific fields to fetch from the PaymentPlan
2369
+ */
2370
+ select?: Prisma.PaymentPlanSelect<ExtArgs> | null;
2371
+ /**
2372
+ * Omit specific fields from the PaymentPlan
2373
+ */
2374
+ omit?: Prisma.PaymentPlanOmit<ExtArgs> | null;
2375
+ /**
2376
+ * Choose, which related nodes to fetch as well
2377
+ */
2378
+ include?: Prisma.PaymentPlanInclude<ExtArgs> | null;
2379
+ where?: Prisma.PaymentPlanWhereInput;
2380
+ };
2381
+ /**
2382
+ * ContractPhase.installments
2383
+ */
2384
+ export type ContractPhase$installmentsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
2385
+ /**
2386
+ * Select specific fields to fetch from the ContractInstallment
2387
+ */
2388
+ select?: Prisma.ContractInstallmentSelect<ExtArgs> | null;
2389
+ /**
2390
+ * Omit specific fields from the ContractInstallment
2391
+ */
2392
+ omit?: Prisma.ContractInstallmentOmit<ExtArgs> | null;
2393
+ /**
2394
+ * Choose, which related nodes to fetch as well
2395
+ */
2396
+ include?: Prisma.ContractInstallmentInclude<ExtArgs> | null;
2397
+ where?: Prisma.ContractInstallmentWhereInput;
2398
+ orderBy?: Prisma.ContractInstallmentOrderByWithRelationInput | Prisma.ContractInstallmentOrderByWithRelationInput[];
2399
+ cursor?: Prisma.ContractInstallmentWhereUniqueInput;
2400
+ take?: number;
2401
+ skip?: number;
2402
+ distinct?: Prisma.ContractInstallmentScalarFieldEnum | Prisma.ContractInstallmentScalarFieldEnum[];
2403
+ };
2404
+ /**
2405
+ * ContractPhase.payments
2406
+ */
2407
+ export type ContractPhase$paymentsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
2408
+ /**
2409
+ * Select specific fields to fetch from the ContractPayment
2410
+ */
2411
+ select?: Prisma.ContractPaymentSelect<ExtArgs> | null;
2412
+ /**
2413
+ * Omit specific fields from the ContractPayment
2414
+ */
2415
+ omit?: Prisma.ContractPaymentOmit<ExtArgs> | null;
2416
+ /**
2417
+ * Choose, which related nodes to fetch as well
2418
+ */
2419
+ include?: Prisma.ContractPaymentInclude<ExtArgs> | null;
2420
+ where?: Prisma.ContractPaymentWhereInput;
2421
+ orderBy?: Prisma.ContractPaymentOrderByWithRelationInput | Prisma.ContractPaymentOrderByWithRelationInput[];
2422
+ cursor?: Prisma.ContractPaymentWhereUniqueInput;
2423
+ take?: number;
2424
+ skip?: number;
2425
+ distinct?: Prisma.ContractPaymentScalarFieldEnum | Prisma.ContractPaymentScalarFieldEnum[];
2426
+ };
2427
+ /**
2428
+ * ContractPhase.steps
2429
+ */
2430
+ export type ContractPhase$stepsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
2431
+ /**
2432
+ * Select specific fields to fetch from the ContractPhaseStep
2433
+ */
2434
+ select?: Prisma.ContractPhaseStepSelect<ExtArgs> | null;
2435
+ /**
2436
+ * Omit specific fields from the ContractPhaseStep
2437
+ */
2438
+ omit?: Prisma.ContractPhaseStepOmit<ExtArgs> | null;
2439
+ /**
2440
+ * Choose, which related nodes to fetch as well
2441
+ */
2442
+ include?: Prisma.ContractPhaseStepInclude<ExtArgs> | null;
2443
+ where?: Prisma.ContractPhaseStepWhereInput;
2444
+ orderBy?: Prisma.ContractPhaseStepOrderByWithRelationInput | Prisma.ContractPhaseStepOrderByWithRelationInput[];
2445
+ cursor?: Prisma.ContractPhaseStepWhereUniqueInput;
2446
+ take?: number;
2447
+ skip?: number;
2448
+ distinct?: Prisma.ContractPhaseStepScalarFieldEnum | Prisma.ContractPhaseStepScalarFieldEnum[];
2449
+ };
2450
+ /**
2451
+ * ContractPhase without action
2452
+ */
2453
+ export type ContractPhaseDefaultArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
2454
+ /**
2455
+ * Select specific fields to fetch from the ContractPhase
2456
+ */
2457
+ select?: Prisma.ContractPhaseSelect<ExtArgs> | null;
2458
+ /**
2459
+ * Omit specific fields from the ContractPhase
2460
+ */
2461
+ omit?: Prisma.ContractPhaseOmit<ExtArgs> | null;
2462
+ /**
2463
+ * Choose, which related nodes to fetch as well
2464
+ */
2465
+ include?: Prisma.ContractPhaseInclude<ExtArgs> | null;
2466
+ };
2467
+ export {};