@valentine-efagene/qshelter-common 2.0.126 → 2.0.127

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.
@@ -5111,6 +5111,7 @@ export declare const OrganizationScalarFieldEnum: {
5111
5111
  readonly name: "name";
5112
5112
  readonly type: "type";
5113
5113
  readonly status: "status";
5114
+ readonly isPlatformOrg: "isPlatformOrg";
5114
5115
  readonly email: "email";
5115
5116
  readonly phone: "phone";
5116
5117
  readonly address: "address";
@@ -215,6 +215,7 @@ export const OrganizationScalarFieldEnum = {
215
215
  name: 'name',
216
216
  type: 'type',
217
217
  status: 'status',
218
+ isPlatformOrg: 'isPlatformOrg',
218
219
  email: 'email',
219
220
  phone: 'phone',
220
221
  address: 'address',
@@ -179,6 +179,7 @@ export declare const OrganizationScalarFieldEnum: {
179
179
  readonly name: "name";
180
180
  readonly type: "type";
181
181
  readonly status: "status";
182
+ readonly isPlatformOrg: "isPlatformOrg";
182
183
  readonly email: "email";
183
184
  readonly phone: "phone";
184
185
  readonly address: "address";
@@ -187,6 +187,7 @@ export const OrganizationScalarFieldEnum = {
187
187
  name: 'name',
188
188
  type: 'type',
189
189
  status: 'status',
190
+ isPlatformOrg: 'isPlatformOrg',
190
191
  email: 'email',
191
192
  phone: 'phone',
192
193
  address: 'address',
@@ -17,6 +17,7 @@ export type OrganizationMinAggregateOutputType = {
17
17
  name: string | null;
18
18
  type: $Enums.OrganizationType | null;
19
19
  status: $Enums.OrganizationStatus | null;
20
+ isPlatformOrg: boolean | null;
20
21
  email: string | null;
21
22
  phone: string | null;
22
23
  address: string | null;
@@ -44,6 +45,7 @@ export type OrganizationMaxAggregateOutputType = {
44
45
  name: string | null;
45
46
  type: $Enums.OrganizationType | null;
46
47
  status: $Enums.OrganizationStatus | null;
48
+ isPlatformOrg: boolean | null;
47
49
  email: string | null;
48
50
  phone: string | null;
49
51
  address: string | null;
@@ -71,6 +73,7 @@ export type OrganizationCountAggregateOutputType = {
71
73
  name: number;
72
74
  type: number;
73
75
  status: number;
76
+ isPlatformOrg: number;
74
77
  email: number;
75
78
  phone: number;
76
79
  address: number;
@@ -99,6 +102,7 @@ export type OrganizationMinAggregateInputType = {
99
102
  name?: true;
100
103
  type?: true;
101
104
  status?: true;
105
+ isPlatformOrg?: true;
102
106
  email?: true;
103
107
  phone?: true;
104
108
  address?: true;
@@ -126,6 +130,7 @@ export type OrganizationMaxAggregateInputType = {
126
130
  name?: true;
127
131
  type?: true;
128
132
  status?: true;
133
+ isPlatformOrg?: true;
129
134
  email?: true;
130
135
  phone?: true;
131
136
  address?: true;
@@ -153,6 +158,7 @@ export type OrganizationCountAggregateInputType = {
153
158
  name?: true;
154
159
  type?: true;
155
160
  status?: true;
161
+ isPlatformOrg?: true;
156
162
  email?: true;
157
163
  phone?: true;
158
164
  address?: true;
@@ -243,6 +249,7 @@ export type OrganizationGroupByOutputType = {
243
249
  name: string;
244
250
  type: $Enums.OrganizationType;
245
251
  status: $Enums.OrganizationStatus;
252
+ isPlatformOrg: boolean;
246
253
  email: string | null;
247
254
  phone: string | null;
248
255
  address: string | null;
@@ -279,6 +286,7 @@ export type OrganizationWhereInput = {
279
286
  name?: Prisma.StringFilter<"Organization"> | string;
280
287
  type?: Prisma.EnumOrganizationTypeFilter<"Organization"> | $Enums.OrganizationType;
281
288
  status?: Prisma.EnumOrganizationStatusFilter<"Organization"> | $Enums.OrganizationStatus;
289
+ isPlatformOrg?: Prisma.BoolFilter<"Organization"> | boolean;
282
290
  email?: Prisma.StringNullableFilter<"Organization"> | string | null;
283
291
  phone?: Prisma.StringNullableFilter<"Organization"> | string | null;
284
292
  address?: Prisma.StringNullableFilter<"Organization"> | string | null;
@@ -308,6 +316,7 @@ export type OrganizationOrderByWithRelationInput = {
308
316
  name?: Prisma.SortOrder;
309
317
  type?: Prisma.SortOrder;
310
318
  status?: Prisma.SortOrder;
319
+ isPlatformOrg?: Prisma.SortOrder;
311
320
  email?: Prisma.SortOrderInput | Prisma.SortOrder;
312
321
  phone?: Prisma.SortOrderInput | Prisma.SortOrder;
313
322
  address?: Prisma.SortOrderInput | Prisma.SortOrder;
@@ -343,6 +352,7 @@ export type OrganizationWhereUniqueInput = Prisma.AtLeast<{
343
352
  name?: Prisma.StringFilter<"Organization"> | string;
344
353
  type?: Prisma.EnumOrganizationTypeFilter<"Organization"> | $Enums.OrganizationType;
345
354
  status?: Prisma.EnumOrganizationStatusFilter<"Organization"> | $Enums.OrganizationStatus;
355
+ isPlatformOrg?: Prisma.BoolFilter<"Organization"> | boolean;
346
356
  email?: Prisma.StringNullableFilter<"Organization"> | string | null;
347
357
  phone?: Prisma.StringNullableFilter<"Organization"> | string | null;
348
358
  address?: Prisma.StringNullableFilter<"Organization"> | string | null;
@@ -372,6 +382,7 @@ export type OrganizationOrderByWithAggregationInput = {
372
382
  name?: Prisma.SortOrder;
373
383
  type?: Prisma.SortOrder;
374
384
  status?: Prisma.SortOrder;
385
+ isPlatformOrg?: Prisma.SortOrder;
375
386
  email?: Prisma.SortOrderInput | Prisma.SortOrder;
376
387
  phone?: Prisma.SortOrderInput | Prisma.SortOrder;
377
388
  address?: Prisma.SortOrderInput | Prisma.SortOrder;
@@ -405,6 +416,7 @@ export type OrganizationScalarWhereWithAggregatesInput = {
405
416
  name?: Prisma.StringWithAggregatesFilter<"Organization"> | string;
406
417
  type?: Prisma.EnumOrganizationTypeWithAggregatesFilter<"Organization"> | $Enums.OrganizationType;
407
418
  status?: Prisma.EnumOrganizationStatusWithAggregatesFilter<"Organization"> | $Enums.OrganizationStatus;
419
+ isPlatformOrg?: Prisma.BoolWithAggregatesFilter<"Organization"> | boolean;
408
420
  email?: Prisma.StringNullableWithAggregatesFilter<"Organization"> | string | null;
409
421
  phone?: Prisma.StringNullableWithAggregatesFilter<"Organization"> | string | null;
410
422
  address?: Prisma.StringNullableWithAggregatesFilter<"Organization"> | string | null;
@@ -431,6 +443,7 @@ export type OrganizationCreateInput = {
431
443
  name: string;
432
444
  type: $Enums.OrganizationType;
433
445
  status?: $Enums.OrganizationStatus;
446
+ isPlatformOrg?: boolean;
434
447
  email?: string | null;
435
448
  phone?: string | null;
436
449
  address?: string | null;
@@ -460,6 +473,7 @@ export type OrganizationUncheckedCreateInput = {
460
473
  name: string;
461
474
  type: $Enums.OrganizationType;
462
475
  status?: $Enums.OrganizationStatus;
476
+ isPlatformOrg?: boolean;
463
477
  email?: string | null;
464
478
  phone?: string | null;
465
479
  address?: string | null;
@@ -487,6 +501,7 @@ export type OrganizationUpdateInput = {
487
501
  name?: Prisma.StringFieldUpdateOperationsInput | string;
488
502
  type?: Prisma.EnumOrganizationTypeFieldUpdateOperationsInput | $Enums.OrganizationType;
489
503
  status?: Prisma.EnumOrganizationStatusFieldUpdateOperationsInput | $Enums.OrganizationStatus;
504
+ isPlatformOrg?: Prisma.BoolFieldUpdateOperationsInput | boolean;
490
505
  email?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
491
506
  phone?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
492
507
  address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
@@ -516,6 +531,7 @@ export type OrganizationUncheckedUpdateInput = {
516
531
  name?: Prisma.StringFieldUpdateOperationsInput | string;
517
532
  type?: Prisma.EnumOrganizationTypeFieldUpdateOperationsInput | $Enums.OrganizationType;
518
533
  status?: Prisma.EnumOrganizationStatusFieldUpdateOperationsInput | $Enums.OrganizationStatus;
534
+ isPlatformOrg?: Prisma.BoolFieldUpdateOperationsInput | boolean;
519
535
  email?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
520
536
  phone?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
521
537
  address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
@@ -544,6 +560,7 @@ export type OrganizationCreateManyInput = {
544
560
  name: string;
545
561
  type: $Enums.OrganizationType;
546
562
  status?: $Enums.OrganizationStatus;
563
+ isPlatformOrg?: boolean;
547
564
  email?: string | null;
548
565
  phone?: string | null;
549
566
  address?: string | null;
@@ -570,6 +587,7 @@ export type OrganizationUpdateManyMutationInput = {
570
587
  name?: Prisma.StringFieldUpdateOperationsInput | string;
571
588
  type?: Prisma.EnumOrganizationTypeFieldUpdateOperationsInput | $Enums.OrganizationType;
572
589
  status?: Prisma.EnumOrganizationStatusFieldUpdateOperationsInput | $Enums.OrganizationStatus;
590
+ isPlatformOrg?: Prisma.BoolFieldUpdateOperationsInput | boolean;
573
591
  email?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
574
592
  phone?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
575
593
  address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
@@ -597,6 +615,7 @@ export type OrganizationUncheckedUpdateManyInput = {
597
615
  name?: Prisma.StringFieldUpdateOperationsInput | string;
598
616
  type?: Prisma.EnumOrganizationTypeFieldUpdateOperationsInput | $Enums.OrganizationType;
599
617
  status?: Prisma.EnumOrganizationStatusFieldUpdateOperationsInput | $Enums.OrganizationStatus;
618
+ isPlatformOrg?: Prisma.BoolFieldUpdateOperationsInput | boolean;
600
619
  email?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
601
620
  phone?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
602
621
  address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
@@ -637,6 +656,7 @@ export type OrganizationCountOrderByAggregateInput = {
637
656
  name?: Prisma.SortOrder;
638
657
  type?: Prisma.SortOrder;
639
658
  status?: Prisma.SortOrder;
659
+ isPlatformOrg?: Prisma.SortOrder;
640
660
  email?: Prisma.SortOrder;
641
661
  phone?: Prisma.SortOrder;
642
662
  address?: Prisma.SortOrder;
@@ -664,6 +684,7 @@ export type OrganizationMaxOrderByAggregateInput = {
664
684
  name?: Prisma.SortOrder;
665
685
  type?: Prisma.SortOrder;
666
686
  status?: Prisma.SortOrder;
687
+ isPlatformOrg?: Prisma.SortOrder;
667
688
  email?: Prisma.SortOrder;
668
689
  phone?: Prisma.SortOrder;
669
690
  address?: Prisma.SortOrder;
@@ -691,6 +712,7 @@ export type OrganizationMinOrderByAggregateInput = {
691
712
  name?: Prisma.SortOrder;
692
713
  type?: Prisma.SortOrder;
693
714
  status?: Prisma.SortOrder;
715
+ isPlatformOrg?: Prisma.SortOrder;
694
716
  email?: Prisma.SortOrder;
695
717
  phone?: Prisma.SortOrder;
696
718
  address?: Prisma.SortOrder;
@@ -785,6 +807,7 @@ export type OrganizationCreateWithoutMembersInput = {
785
807
  name: string;
786
808
  type: $Enums.OrganizationType;
787
809
  status?: $Enums.OrganizationStatus;
810
+ isPlatformOrg?: boolean;
788
811
  email?: string | null;
789
812
  phone?: string | null;
790
813
  address?: string | null;
@@ -813,6 +836,7 @@ export type OrganizationUncheckedCreateWithoutMembersInput = {
813
836
  name: string;
814
837
  type: $Enums.OrganizationType;
815
838
  status?: $Enums.OrganizationStatus;
839
+ isPlatformOrg?: boolean;
816
840
  email?: string | null;
817
841
  phone?: string | null;
818
842
  address?: string | null;
@@ -852,6 +876,7 @@ export type OrganizationUpdateWithoutMembersInput = {
852
876
  name?: Prisma.StringFieldUpdateOperationsInput | string;
853
877
  type?: Prisma.EnumOrganizationTypeFieldUpdateOperationsInput | $Enums.OrganizationType;
854
878
  status?: Prisma.EnumOrganizationStatusFieldUpdateOperationsInput | $Enums.OrganizationStatus;
879
+ isPlatformOrg?: Prisma.BoolFieldUpdateOperationsInput | boolean;
855
880
  email?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
856
881
  phone?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
857
882
  address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
@@ -880,6 +905,7 @@ export type OrganizationUncheckedUpdateWithoutMembersInput = {
880
905
  name?: Prisma.StringFieldUpdateOperationsInput | string;
881
906
  type?: Prisma.EnumOrganizationTypeFieldUpdateOperationsInput | $Enums.OrganizationType;
882
907
  status?: Prisma.EnumOrganizationStatusFieldUpdateOperationsInput | $Enums.OrganizationStatus;
908
+ isPlatformOrg?: Prisma.BoolFieldUpdateOperationsInput | boolean;
883
909
  email?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
884
910
  phone?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
885
911
  address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
@@ -906,6 +932,7 @@ export type OrganizationCreateWithoutTenantInput = {
906
932
  name: string;
907
933
  type: $Enums.OrganizationType;
908
934
  status?: $Enums.OrganizationStatus;
935
+ isPlatformOrg?: boolean;
909
936
  email?: string | null;
910
937
  phone?: string | null;
911
938
  address?: string | null;
@@ -933,6 +960,7 @@ export type OrganizationUncheckedCreateWithoutTenantInput = {
933
960
  name: string;
934
961
  type: $Enums.OrganizationType;
935
962
  status?: $Enums.OrganizationStatus;
963
+ isPlatformOrg?: boolean;
936
964
  email?: string | null;
937
965
  phone?: string | null;
938
966
  address?: string | null;
@@ -985,6 +1013,7 @@ export type OrganizationScalarWhereInput = {
985
1013
  name?: Prisma.StringFilter<"Organization"> | string;
986
1014
  type?: Prisma.EnumOrganizationTypeFilter<"Organization"> | $Enums.OrganizationType;
987
1015
  status?: Prisma.EnumOrganizationStatusFilter<"Organization"> | $Enums.OrganizationStatus;
1016
+ isPlatformOrg?: Prisma.BoolFilter<"Organization"> | boolean;
988
1017
  email?: Prisma.StringNullableFilter<"Organization"> | string | null;
989
1018
  phone?: Prisma.StringNullableFilter<"Organization"> | string | null;
990
1019
  address?: Prisma.StringNullableFilter<"Organization"> | string | null;
@@ -1011,6 +1040,7 @@ export type OrganizationCreateManyTenantInput = {
1011
1040
  name: string;
1012
1041
  type: $Enums.OrganizationType;
1013
1042
  status?: $Enums.OrganizationStatus;
1043
+ isPlatformOrg?: boolean;
1014
1044
  email?: string | null;
1015
1045
  phone?: string | null;
1016
1046
  address?: string | null;
@@ -1037,6 +1067,7 @@ export type OrganizationUpdateWithoutTenantInput = {
1037
1067
  name?: Prisma.StringFieldUpdateOperationsInput | string;
1038
1068
  type?: Prisma.EnumOrganizationTypeFieldUpdateOperationsInput | $Enums.OrganizationType;
1039
1069
  status?: Prisma.EnumOrganizationStatusFieldUpdateOperationsInput | $Enums.OrganizationStatus;
1070
+ isPlatformOrg?: Prisma.BoolFieldUpdateOperationsInput | boolean;
1040
1071
  email?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1041
1072
  phone?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1042
1073
  address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
@@ -1064,6 +1095,7 @@ export type OrganizationUncheckedUpdateWithoutTenantInput = {
1064
1095
  name?: Prisma.StringFieldUpdateOperationsInput | string;
1065
1096
  type?: Prisma.EnumOrganizationTypeFieldUpdateOperationsInput | $Enums.OrganizationType;
1066
1097
  status?: Prisma.EnumOrganizationStatusFieldUpdateOperationsInput | $Enums.OrganizationStatus;
1098
+ isPlatformOrg?: Prisma.BoolFieldUpdateOperationsInput | boolean;
1067
1099
  email?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1068
1100
  phone?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1069
1101
  address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
@@ -1091,6 +1123,7 @@ export type OrganizationUncheckedUpdateManyWithoutTenantInput = {
1091
1123
  name?: Prisma.StringFieldUpdateOperationsInput | string;
1092
1124
  type?: Prisma.EnumOrganizationTypeFieldUpdateOperationsInput | $Enums.OrganizationType;
1093
1125
  status?: Prisma.EnumOrganizationStatusFieldUpdateOperationsInput | $Enums.OrganizationStatus;
1126
+ isPlatformOrg?: Prisma.BoolFieldUpdateOperationsInput | boolean;
1094
1127
  email?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1095
1128
  phone?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
1096
1129
  address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
@@ -1142,6 +1175,7 @@ export type OrganizationSelect<ExtArgs extends runtime.Types.Extensions.Internal
1142
1175
  name?: boolean;
1143
1176
  type?: boolean;
1144
1177
  status?: boolean;
1178
+ isPlatformOrg?: boolean;
1145
1179
  email?: boolean;
1146
1180
  phone?: boolean;
1147
1181
  address?: boolean;
@@ -1172,6 +1206,7 @@ export type OrganizationSelectScalar = {
1172
1206
  name?: boolean;
1173
1207
  type?: boolean;
1174
1208
  status?: boolean;
1209
+ isPlatformOrg?: boolean;
1175
1210
  email?: boolean;
1176
1211
  phone?: boolean;
1177
1212
  address?: boolean;
@@ -1193,7 +1228,7 @@ export type OrganizationSelectScalar = {
1193
1228
  createdAt?: boolean;
1194
1229
  updatedAt?: boolean;
1195
1230
  };
1196
- export type OrganizationOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "tenantId" | "name" | "type" | "status" | "email" | "phone" | "address" | "city" | "state" | "country" | "website" | "logoUrl" | "description" | "bankCode" | "bankLicenseNo" | "swiftCode" | "sortCode" | "cacNumber" | "cacCertificateUrl" | "taxId" | "approvedAt" | "approvedById" | "createdAt" | "updatedAt", ExtArgs["result"]["organization"]>;
1231
+ export type OrganizationOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "tenantId" | "name" | "type" | "status" | "isPlatformOrg" | "email" | "phone" | "address" | "city" | "state" | "country" | "website" | "logoUrl" | "description" | "bankCode" | "bankLicenseNo" | "swiftCode" | "sortCode" | "cacNumber" | "cacCertificateUrl" | "taxId" | "approvedAt" | "approvedById" | "createdAt" | "updatedAt", ExtArgs["result"]["organization"]>;
1197
1232
  export type OrganizationInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1198
1233
  tenant?: boolean | Prisma.TenantDefaultArgs<ExtArgs>;
1199
1234
  members?: boolean | Prisma.Organization$membersArgs<ExtArgs>;
@@ -1211,6 +1246,7 @@ export type $OrganizationPayload<ExtArgs extends runtime.Types.Extensions.Intern
1211
1246
  name: string;
1212
1247
  type: $Enums.OrganizationType;
1213
1248
  status: $Enums.OrganizationStatus;
1249
+ isPlatformOrg: boolean;
1214
1250
  email: string | null;
1215
1251
  phone: string | null;
1216
1252
  address: string | null;
@@ -1540,6 +1576,7 @@ export interface OrganizationFieldRefs {
1540
1576
  readonly name: Prisma.FieldRef<"Organization", 'String'>;
1541
1577
  readonly type: Prisma.FieldRef<"Organization", 'OrganizationType'>;
1542
1578
  readonly status: Prisma.FieldRef<"Organization", 'OrganizationStatus'>;
1579
+ readonly isPlatformOrg: Prisma.FieldRef<"Organization", 'Boolean'>;
1543
1580
  readonly email: Prisma.FieldRef<"Organization", 'String'>;
1544
1581
  readonly phone: Prisma.FieldRef<"Organization", 'String'>;
1545
1582
  readonly address: Prisma.FieldRef<"Organization", 'String'>;
@@ -10,6 +10,7 @@ export * from './ApplicationTermination';
10
10
  export * from './ApprovalRequest';
11
11
  export * from './DeviceEndpoint';
12
12
  export * from './DocumentRequirementRule';
13
+ export * from './DocumentReview';
13
14
  export * from './DocumentTemplate';
14
15
  export * from './DocumentationPhase';
15
16
  export * from './DocumentationPlan';
@@ -25,6 +26,8 @@ export * from './EventHandlerExecution';
25
26
  export * from './EventType';
26
27
  export * from './OAuthState';
27
28
  export * from './OfferLetter';
29
+ export * from './Organization';
30
+ export * from './OrganizationMember';
28
31
  export * from './PasswordReset';
29
32
  export * from './PaymentInstallment';
30
33
  export * from './PaymentMethodChangeRequest';
@@ -10,6 +10,7 @@ export * from './ApplicationTermination';
10
10
  export * from './ApprovalRequest';
11
11
  export * from './DeviceEndpoint';
12
12
  export * from './DocumentRequirementRule';
13
+ export * from './DocumentReview';
13
14
  export * from './DocumentTemplate';
14
15
  export * from './DocumentationPhase';
15
16
  export * from './DocumentationPlan';
@@ -25,6 +26,8 @@ export * from './EventHandlerExecution';
25
26
  export * from './EventType';
26
27
  export * from './OAuthState';
27
28
  export * from './OfferLetter';
29
+ export * from './Organization';
30
+ export * from './OrganizationMember';
28
31
  export * from './PasswordReset';
29
32
  export * from './PaymentInstallment';
30
33
  export * from './PaymentMethodChangeRequest';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@valentine-efagene/qshelter-common",
3
- "version": "2.0.126",
3
+ "version": "2.0.127",
4
4
  "description": "Shared database schemas and utilities for QShelter services",
5
5
  "main": "dist/src/index.js",
6
6
  "types": "dist/src/index.d.ts",
@@ -0,0 +1,59 @@
1
+ -- AlterTable
2
+ ALTER TABLE `application_documents` ADD COLUMN `replacesDocumentId` VARCHAR(191) NULL,
3
+ ADD COLUMN `version` INTEGER NOT NULL DEFAULT 1;
4
+
5
+ -- AlterTable
6
+ ALTER TABLE `documentation_plan_steps` ADD COLUMN `reviewOrder` VARCHAR(191) NULL,
7
+ ADD COLUMN `reviewRequirements` JSON NULL;
8
+
9
+ -- AlterTable
10
+ ALTER TABLE `documentation_steps` ADD COLUMN `reviewOrder` VARCHAR(191) NULL,
11
+ ADD COLUMN `reviewRequirements` JSON NULL;
12
+
13
+ -- CreateTable
14
+ CREATE TABLE `document_reviews` (
15
+ `id` VARCHAR(191) NOT NULL,
16
+ `tenantId` VARCHAR(191) NOT NULL,
17
+ `documentId` VARCHAR(191) NOT NULL,
18
+ `reviewParty` ENUM('INTERNAL', 'BANK', 'DEVELOPER', 'LEGAL', 'GOVERNMENT', 'INSURER', 'CUSTOMER') NOT NULL,
19
+ `organizationId` VARCHAR(191) NULL,
20
+ `reviewerId` VARCHAR(191) NULL,
21
+ `reviewerName` VARCHAR(191) NULL,
22
+ `decision` ENUM('PENDING', 'APPROVED', 'REJECTED', 'CHANGES_REQUESTED', 'WAIVED') NOT NULL DEFAULT 'PENDING',
23
+ `comments` TEXT NULL,
24
+ `concerns` JSON NULL,
25
+ `requestedAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
26
+ `dueAt` DATETIME(3) NULL,
27
+ `reviewedAt` DATETIME(3) NULL,
28
+ `reviewOrder` INTEGER NOT NULL DEFAULT 0,
29
+ `parentReviewId` VARCHAR(191) NULL,
30
+ `createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
31
+ `updatedAt` DATETIME(3) NOT NULL,
32
+
33
+ INDEX `document_reviews_tenantId_idx`(`tenantId`),
34
+ INDEX `document_reviews_documentId_idx`(`documentId`),
35
+ INDEX `document_reviews_reviewParty_idx`(`reviewParty`),
36
+ INDEX `document_reviews_decision_idx`(`decision`),
37
+ INDEX `document_reviews_reviewerId_idx`(`reviewerId`),
38
+ INDEX `document_reviews_parentReviewId_idx`(`parentReviewId`),
39
+ UNIQUE INDEX `document_reviews_documentId_reviewParty_organizationId_key`(`documentId`, `reviewParty`, `organizationId`),
40
+ PRIMARY KEY (`id`)
41
+ ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
42
+
43
+ -- CreateIndex
44
+ CREATE INDEX `application_documents_replacesDocumentId_idx` ON `application_documents`(`replacesDocumentId`);
45
+
46
+ -- AddForeignKey
47
+ ALTER TABLE `application_documents` ADD CONSTRAINT `application_documents_replacesDocumentId_fkey` FOREIGN KEY (`replacesDocumentId`) REFERENCES `application_documents`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;
48
+
49
+ -- AddForeignKey
50
+ ALTER TABLE `document_reviews` ADD CONSTRAINT `document_reviews_tenantId_fkey` FOREIGN KEY (`tenantId`) REFERENCES `tenants`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
51
+
52
+ -- AddForeignKey
53
+ ALTER TABLE `document_reviews` ADD CONSTRAINT `document_reviews_documentId_fkey` FOREIGN KEY (`documentId`) REFERENCES `application_documents`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
54
+
55
+ -- AddForeignKey
56
+ ALTER TABLE `document_reviews` ADD CONSTRAINT `document_reviews_reviewerId_fkey` FOREIGN KEY (`reviewerId`) REFERENCES `users`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;
57
+
58
+ -- AddForeignKey
59
+ ALTER TABLE `document_reviews` ADD CONSTRAINT `document_reviews_parentReviewId_fkey` FOREIGN KEY (`parentReviewId`) REFERENCES `document_reviews`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;
@@ -201,8 +201,12 @@ enum ApprovalDecision {
201
201
 
202
202
  /// Type of organization on the platform
203
203
  enum OrganizationType {
204
+ PLATFORM // The platform operator (e.g., QShelter) - the tenant's own organization
204
205
  BANK // Financial institution providing mortgages (e.g., Access Bank, GTBank)
205
206
  DEVELOPER // Property developer building and selling properties
207
+ LEGAL // Legal firms handling conveyancing and documentation
208
+ INSURER // Insurance companies providing property or mortgage insurance
209
+ GOVERNMENT // Government agencies (e.g., land registry, tax authorities)
206
210
  }
207
211
 
208
212
  /// Status of an organization
@@ -605,9 +609,12 @@ model Organization {
605
609
  id String @id @default(cuid())
606
610
  tenantId String
607
611
  name String // e.g., "Access Bank PLC", "Lekki Gardens Ltd"
608
- type OrganizationType // BANK or DEVELOPER
612
+ type OrganizationType // PLATFORM, BANK, DEVELOPER, LEGAL, INSURER, GOVERNMENT
609
613
  status OrganizationStatus @default(PENDING)
610
614
 
615
+ // Platform organization flag - marks the tenant's own organization
616
+ isPlatformOrg Boolean @default(false)
617
+
611
618
  // Common fields
612
619
  email String? // Primary contact email
613
620
  phone String? // Primary contact phone
@@ -2516,9 +2523,9 @@ model ApplicationDocument {
2516
2523
  status DocumentStatus @default(PENDING)
2517
2524
 
2518
2525
  // Document versioning (for re-uploads after changes requested)
2519
- version Int @default(1)
2526
+ version Int @default(1)
2520
2527
  replacesDocumentId String? // If this is a revision, points to original
2521
- replacesDocument ApplicationDocument? @relation("DocumentRevisions", fields: [replacesDocumentId], references: [id])
2528
+ replacesDocument ApplicationDocument? @relation("DocumentRevisions", fields: [replacesDocumentId], references: [id])
2522
2529
  revisions ApplicationDocument[] @relation("DocumentRevisions")
2523
2530
 
2524
2531
  createdAt DateTime @default(now())