@dynamatix/gb-schemas 2.0.45 → 2.0.47
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.
- package/dist/entities/applicants/applicant-share-holding.entity.d.ts +18 -0
- package/dist/entities/applicants/applicant-share-holding.entity.d.ts.map +1 -0
- package/dist/entities/applicants/applicant-share-holding.entity.js +5 -0
- package/dist/entities/applications/application-company.entity.d.ts +52 -4
- package/dist/entities/applications/application-company.entity.d.ts.map +1 -1
- package/dist/entities/applications/application-company.entity.js +10 -0
- package/dist/entities/applications/index.d.ts +2 -3
- package/dist/entities/applications/index.d.ts.map +1 -1
- package/dist/entities/applications/index.js +0 -1
- package/dist/entities/users/role-group.entity.d.ts +1 -0
- package/dist/entities/users/role-group.entity.d.ts.map +1 -1
- package/dist/entities/users/role.entity.d.ts +2 -0
- package/dist/entities/users/role.entity.d.ts.map +1 -1
- package/dist/entities/users/user.entity.d.ts +2 -0
- package/dist/entities/users/user.entity.d.ts.map +1 -1
- package/entities/applicants/applicant-share-holding.entity.ts +23 -0
- package/entities/applications/application-company.entity.ts +64 -5
- package/entities/applications/index.ts +0 -3
- package/entities/users/role-group.entity.ts +1 -0
- package/entities/users/role.entity.ts +2 -0
- package/entities/users/user.entity.ts +2 -0
- package/package.json +1 -1
- package/prisma/applicants/applicant-share-holding.prisma +17 -0
- package/prisma/applications/application-company.prisma +50 -7
- package/prisma/applications/application.prisma +0 -1
- package/prisma/migrations/20250513143530_update_credit_card_commitment_schema/migration.sql +8 -8
- package/prisma/migrations/20250513170654_update_mortgage_commitment_schema/migration.sql +89 -89
- package/prisma/migrations/20250513183558_update_loan_commitment_schema/migration.sql +33 -33
- package/prisma/migrations/20250513184341_update_loan_commitment_schema/migration.sql +4 -4
- package/prisma/migrations/20250513202307_update_role_schema/migration.sql +12 -12
- package/prisma/migrations/20250514062536_update_role_group_schema/migration.sql +12 -12
- package/prisma/migrations/20250514064054_update_user_schema/migration.sql +12 -12
- package/prisma/migrations/20250514071524_update_user_schema/migration.sql +15 -15
- package/prisma/migrations/20250514072729_update_user_schema/migration.sql +18 -18
- package/prisma/migrations/20250514102042_update_user_rolegroup_role_schemas/migration.sql +9 -0
- package/prisma/migrations/20250514183537_update_application_company_schema/migration.sql +100 -0
- package/prisma/schema.prisma +83 -97
- package/prisma/shared/lookup.prisma +4 -5
- package/prisma/users/role-group.prisma +1 -0
- package/prisma/users/role.prisma +7 -6
- package/prisma/users/user.prisma +3 -1
- package/dist/entities/applications/company.entity.d.ts +0 -77
- package/dist/entities/applications/company.entity.d.ts.map +0 -1
- package/dist/entities/applications/company.entity.js +0 -23
- package/entities/applications/company.entity.ts +0 -102
- package/prisma/applications/company.prisma +0 -76
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ApplicantEntity } from "../applicants/applicant.entity";
|
|
2
|
+
import { LookupEntity } from "../shared/lookup.entity";
|
|
3
|
+
import { ApplicationCompanyEntity } from "../applications/application-company.entity";
|
|
4
|
+
export declare class ApplicantShareholdingEntity {
|
|
5
|
+
id: string;
|
|
6
|
+
companyId: string;
|
|
7
|
+
applicantId: string;
|
|
8
|
+
applicantName: string;
|
|
9
|
+
directorShareholderLid?: string;
|
|
10
|
+
shareholding?: number;
|
|
11
|
+
createdAt: Date;
|
|
12
|
+
updatedAt: Date;
|
|
13
|
+
company?: ApplicationCompanyEntity;
|
|
14
|
+
applicant?: ApplicantEntity;
|
|
15
|
+
directorShareholder?: LookupEntity;
|
|
16
|
+
constructor(partial: Partial<ApplicantShareholdingEntity>);
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=applicant-share-holding.entity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"applicant-share-holding.entity.d.ts","sourceRoot":"","sources":["../../../entities/applicants/applicant-share-holding.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,wBAAwB,EAAE,MAAM,4CAA4C,CAAC;AAEtF,qBAAa,2BAA2B;IACpC,EAAE,EAAG,MAAM,CAAC;IACZ,SAAS,EAAG,MAAM,CAAC;IACnB,WAAW,EAAG,MAAM,CAAC;IACrB,aAAa,EAAG,MAAM,CAAC;IACvB,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,EAAG,IAAI,CAAC;IACjB,SAAS,EAAG,IAAI,CAAC;IAGjB,OAAO,CAAC,EAAE,wBAAwB,CAAC;IACnC,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B,mBAAmB,CAAC,EAAE,YAAY,CAAC;gBAEvB,OAAO,EAAE,OAAO,CAAC,2BAA2B,CAAC;CAG5D"}
|
|
@@ -1,12 +1,60 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { LookupEntity } from "../shared/lookup.entity";
|
|
2
|
+
import { ApplicationEntity } from "./application.entity";
|
|
3
|
+
import { ApplicantShareholdingEntity } from "../applicants/applicant-share-holding.entity";
|
|
2
4
|
export declare class ApplicationCompanyEntity {
|
|
3
5
|
id: string;
|
|
4
6
|
applicationId: string;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
+
pageValidFlag?: boolean;
|
|
8
|
+
registeredName: string;
|
|
9
|
+
businessTypeLid: string;
|
|
10
|
+
registeredNumber: number;
|
|
11
|
+
taxJurisdictionLid: string;
|
|
12
|
+
tradingSince: string;
|
|
13
|
+
natureOfBusiness: string;
|
|
14
|
+
yearEnd: string;
|
|
15
|
+
addressPostCode: string;
|
|
16
|
+
addressLine1: string;
|
|
17
|
+
addressLine2?: string;
|
|
18
|
+
addressLine3?: string;
|
|
19
|
+
addressCity?: string;
|
|
20
|
+
addressCountryLid: string;
|
|
21
|
+
yearEnd1: number;
|
|
22
|
+
turnoverYear1: number;
|
|
23
|
+
netProfitYear1: number;
|
|
24
|
+
yearEnd2: number;
|
|
25
|
+
turnoverYear2: number;
|
|
26
|
+
netProfitYear2: number;
|
|
27
|
+
yearEnd3: number;
|
|
28
|
+
turnoverYear3: number;
|
|
29
|
+
netProfitYear3: number;
|
|
30
|
+
companyCreditDefaults: string;
|
|
31
|
+
companyCountyCourtJudgment: string;
|
|
32
|
+
companySecuredArrears: string;
|
|
33
|
+
companyUnsecuredArrears: string;
|
|
34
|
+
companyBankruptcy: string;
|
|
35
|
+
companyBankruptcyYes: boolean;
|
|
36
|
+
companyBankruptcyNo: boolean;
|
|
37
|
+
companyCCJInLastThreeYearYes: boolean;
|
|
38
|
+
companyCCJInLastThreeYearNo: boolean;
|
|
39
|
+
companyDefaultsInLastYearYes: boolean;
|
|
40
|
+
companyDefaultsInLastYearNo: boolean;
|
|
41
|
+
companyAnyVoluntaryEnforcedPossessionYes: boolean;
|
|
42
|
+
companyAnyVoluntaryEnforcedPossessionNo: boolean;
|
|
43
|
+
doYouKnowRegisteredNumber: boolean;
|
|
44
|
+
sicCodes: string[];
|
|
45
|
+
epc: string;
|
|
46
|
+
remainingLease: string;
|
|
47
|
+
dateOfIncorporation?: string;
|
|
7
48
|
createdAt: Date;
|
|
8
49
|
updatedAt: Date;
|
|
9
|
-
application
|
|
50
|
+
application?: ApplicationEntity;
|
|
51
|
+
businessType?: LookupEntity;
|
|
52
|
+
taxJurisdiction?: LookupEntity;
|
|
53
|
+
addressCountry?: LookupEntity;
|
|
54
|
+
applicantShareholdings?: ApplicantShareholdingEntity[];
|
|
10
55
|
constructor(partial: Partial<ApplicationCompanyEntity>);
|
|
56
|
+
get businessTypeName(): string | null;
|
|
57
|
+
get taxJurisdictionName(): string | null;
|
|
58
|
+
get addressCountryName(): string | null;
|
|
11
59
|
}
|
|
12
60
|
//# sourceMappingURL=application-company.entity.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"application-company.entity.d.ts","sourceRoot":"","sources":["../../../entities/applications/application-company.entity.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"application-company.entity.d.ts","sourceRoot":"","sources":["../../../entities/applications/application-company.entity.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,2BAA2B,EAAE,MAAM,8CAA8C,CAAC;AAE3F,qBAAa,wBAAwB;IACjC,EAAE,EAAG,MAAM,CAAC;IACZ,aAAa,EAAG,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,cAAc,EAAG,MAAM,CAAC;IACxB,eAAe,EAAG,MAAM,CAAC;IACzB,gBAAgB,EAAG,MAAM,CAAC;IAC1B,kBAAkB,EAAG,MAAM,CAAC;IAC5B,YAAY,EAAG,MAAM,CAAC;IACtB,gBAAgB,EAAG,MAAM,CAAC;IAC1B,OAAO,EAAG,MAAM,CAAC;IACjB,eAAe,EAAG,MAAM,CAAC;IACzB,YAAY,EAAG,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,EAAG,MAAM,CAAC;IAC3B,QAAQ,EAAG,MAAM,CAAC;IAClB,aAAa,EAAG,MAAM,CAAC;IACvB,cAAc,EAAG,MAAM,CAAC;IACxB,QAAQ,EAAG,MAAM,CAAC;IAClB,aAAa,EAAG,MAAM,CAAC;IACvB,cAAc,EAAG,MAAM,CAAC;IACxB,QAAQ,EAAG,MAAM,CAAC;IAClB,aAAa,EAAG,MAAM,CAAC;IACvB,cAAc,EAAG,MAAM,CAAC;IACxB,qBAAqB,EAAG,MAAM,CAAC;IAC/B,0BAA0B,EAAG,MAAM,CAAC;IACpC,qBAAqB,EAAG,MAAM,CAAC;IAC/B,uBAAuB,EAAG,MAAM,CAAC;IACjC,iBAAiB,EAAG,MAAM,CAAC;IAC3B,oBAAoB,EAAG,OAAO,CAAC;IAC/B,mBAAmB,EAAG,OAAO,CAAC;IAC9B,4BAA4B,EAAG,OAAO,CAAC;IACvC,2BAA2B,EAAG,OAAO,CAAC;IACtC,4BAA4B,EAAG,OAAO,CAAC;IACvC,2BAA2B,EAAG,OAAO,CAAC;IACtC,wCAAwC,EAAG,OAAO,CAAC;IACnD,uCAAuC,EAAG,OAAO,CAAC;IAClD,yBAAyB,EAAG,OAAO,CAAC;IACpC,QAAQ,EAAG,MAAM,EAAE,CAAC;IACpB,GAAG,EAAG,MAAM,CAAC;IACb,cAAc,EAAG,MAAM,CAAC;IACxB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,SAAS,EAAG,IAAI,CAAC;IACjB,SAAS,EAAG,IAAI,CAAC;IAGjB,WAAW,CAAC,EAAE,iBAAiB,CAAC;IAChC,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,eAAe,CAAC,EAAE,YAAY,CAAC;IAC/B,cAAc,CAAC,EAAE,YAAY,CAAC;IAC9B,sBAAsB,CAAC,EAAE,2BAA2B,EAAE,CAAC;gBAE3C,OAAO,EAAE,OAAO,CAAC,wBAAwB,CAAC;IAKtD,IAAI,gBAAgB,IAAI,MAAM,GAAG,IAAI,CAEpC;IAED,IAAI,mBAAmB,IAAI,MAAM,GAAG,IAAI,CAEvC;IAED,IAAI,kBAAkB,IAAI,MAAM,GAAG,IAAI,CAEtC;CACJ"}
|
|
@@ -2,4 +2,14 @@ export class ApplicationCompanyEntity {
|
|
|
2
2
|
constructor(partial) {
|
|
3
3
|
Object.assign(this, partial);
|
|
4
4
|
}
|
|
5
|
+
// Virtual fields from Mongoose model
|
|
6
|
+
get businessTypeName() {
|
|
7
|
+
return this.businessType?.name ?? null;
|
|
8
|
+
}
|
|
9
|
+
get taxJurisdictionName() {
|
|
10
|
+
return this.taxJurisdiction?.name ?? null;
|
|
11
|
+
}
|
|
12
|
+
get addressCountryName() {
|
|
13
|
+
return this.addressCountry?.name ?? null;
|
|
14
|
+
}
|
|
5
15
|
}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import type { Application, ProductFeatures, Solicitor, Broker, ChecklistItem,
|
|
2
|
-
export type { Application, ProductFeatures, Solicitor, Broker, ChecklistItem,
|
|
1
|
+
import type { Application, ProductFeatures, Solicitor, Broker, ChecklistItem, ApplicationRationale, ApplicationProduct, ApplicationNote, ApplicationOffer, ApplicationOnboarding, ApplicationIllustration, ApplicationLegal, ApplicationMortgage, ApplicationDocument, ApplicationFieldConfig, ApplicationAudit, ApplicationCompany, ApplicationDirectDebit } from '@prisma/client';
|
|
2
|
+
export type { Application, ProductFeatures, Solicitor, Broker, ChecklistItem, ApplicationRationale, ApplicationProduct, ApplicationNote, ApplicationOffer, ApplicationOnboarding, ApplicationIllustration, ApplicationLegal, ApplicationMortgage, ApplicationDocument, ApplicationFieldConfig, ApplicationAudit, ApplicationCompany, ApplicationDirectDebit };
|
|
3
3
|
export * from './application.entity';
|
|
4
4
|
export * from './product-features.entity';
|
|
5
5
|
export * from './solicitor.entity';
|
|
6
6
|
export * from './broker.entity';
|
|
7
7
|
export * from './checklist-item.entity';
|
|
8
|
-
export * from './company.entity';
|
|
9
8
|
export * from './application-credit-profile.entity';
|
|
10
9
|
export * from './application-rationale.entity';
|
|
11
10
|
export * from './application-product.entity';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../entities/applications/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,WAAW,EACX,eAAe,EACf,SAAS,EACT,MAAM,EACN,aAAa,EACb,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../entities/applications/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,WAAW,EACX,eAAe,EACf,SAAS,EACT,MAAM,EACN,aAAa,EACb,oBAAoB,EACpB,kBAAkB,EAClB,eAAe,EACf,gBAAgB,EAChB,qBAAqB,EACrB,uBAAuB,EACvB,gBAAgB,EAChB,mBAAmB,EACnB,mBAAmB,EACnB,sBAAsB,EACtB,gBAAgB,EAChB,kBAAkB,EAClB,sBAAsB,EACzB,MAAM,gBAAgB,CAAC;AAGxB,YAAY,EACR,WAAW,EACX,eAAe,EACf,SAAS,EACT,MAAM,EACN,aAAa,EACb,oBAAoB,EACpB,kBAAkB,EAClB,eAAe,EACf,gBAAgB,EAChB,qBAAqB,EACrB,uBAAuB,EACvB,gBAAgB,EAChB,mBAAmB,EACnB,mBAAmB,EACnB,sBAAsB,EACtB,gBAAgB,EAChB,kBAAkB,EAClB,sBAAsB,EACzB,CAAC;AAGF,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qCAAqC,CAAC;AACpD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iCAAiC,CAAC;AAChD,cAAc,mCAAmC,CAAC;AAClD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,kCAAkC,CAAC;AACjD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,mCAAmC,CAAC"}
|
|
@@ -4,7 +4,6 @@ export * from './product-features.entity';
|
|
|
4
4
|
export * from './solicitor.entity';
|
|
5
5
|
export * from './broker.entity';
|
|
6
6
|
export * from './checklist-item.entity';
|
|
7
|
-
export * from './company.entity';
|
|
8
7
|
export * from './application-credit-profile.entity';
|
|
9
8
|
export * from './application-rationale.entity';
|
|
10
9
|
export * from './application-product.entity';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"role-group.entity.d.ts","sourceRoot":"","sources":["../../../entities/users/role-group.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,qBAAa,eAAe;IACxB,EAAE,EAAG,MAAM,CAAC;IACZ,OAAO,EAAG,MAAM,CAAC;IACjB,IAAI,EAAG,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,EAAG,IAAI,CAAC;IACjB,SAAS,EAAG,IAAI,CAAC;IAGjB,KAAK,CAAC,EAAE,UAAU,EAAE,CAAC;gBAET,OAAO,EAAE,OAAO,CAAC,eAAe,CAAC;CAGhD"}
|
|
1
|
+
{"version":3,"file":"role-group.entity.d.ts","sourceRoot":"","sources":["../../../entities/users/role-group.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,qBAAa,eAAe;IACxB,EAAE,EAAG,MAAM,CAAC;IACZ,OAAO,EAAG,MAAM,CAAC;IACjB,IAAI,EAAG,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,SAAS,EAAG,IAAI,CAAC;IACjB,SAAS,EAAG,IAAI,CAAC;IAGjB,KAAK,CAAC,EAAE,UAAU,EAAE,CAAC;gBAET,OAAO,EAAE,OAAO,CAAC,eAAe,CAAC;CAGhD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"role.entity.d.ts","sourceRoot":"","sources":["../../../entities/users/role.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,qBAAa,UAAU;IACnB,EAAE,EAAG,MAAM,CAAC;IACZ,MAAM,EAAG,MAAM,CAAC;IAChB,IAAI,EAAG,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,EAAG,IAAI,CAAC;IACjB,SAAS,EAAG,IAAI,CAAC;IAGjB,WAAW,CAAC,EAAE,gBAAgB,EAAE,CAAC;IACjC,UAAU,CAAC,EAAE,eAAe,EAAE,CAAC;gBAEnB,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC;CAG3C"}
|
|
1
|
+
{"version":3,"file":"role.entity.d.ts","sourceRoot":"","sources":["../../../entities/users/role.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,qBAAa,UAAU;IACnB,EAAE,EAAG,MAAM,CAAC;IACZ,MAAM,EAAG,MAAM,CAAC;IAChB,IAAI,EAAG,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,SAAS,EAAG,IAAI,CAAC;IACjB,SAAS,EAAG,IAAI,CAAC;IAGjB,WAAW,CAAC,EAAE,gBAAgB,EAAE,CAAC;IACjC,UAAU,CAAC,EAAE,eAAe,EAAE,CAAC;gBAEnB,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC;CAG3C"}
|
|
@@ -7,6 +7,7 @@ export declare class UserEntity {
|
|
|
7
7
|
fullName: string;
|
|
8
8
|
organisationId?: string;
|
|
9
9
|
status: number;
|
|
10
|
+
externalData?: string;
|
|
10
11
|
modifiedOn?: Date;
|
|
11
12
|
modifiedById?: number;
|
|
12
13
|
createdOnInApprivo?: Date;
|
|
@@ -14,6 +15,7 @@ export declare class UserEntity {
|
|
|
14
15
|
deletedOn?: Date;
|
|
15
16
|
deletedById?: number;
|
|
16
17
|
token?: string;
|
|
18
|
+
groupIds?: string[];
|
|
17
19
|
createdAt: Date;
|
|
18
20
|
updatedAt: Date;
|
|
19
21
|
groups?: RoleGroupEntity[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.entity.d.ts","sourceRoot":"","sources":["../../../entities/users/user.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,qBAAa,UAAU;IACnB,EAAE,EAAG,MAAM,CAAC;IACZ,SAAS,EAAG,MAAM,CAAC;IACnB,KAAK,EAAG,MAAM,CAAC;IACf,QAAQ,EAAG,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,EAAG,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,IAAI,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kBAAkB,CAAC,EAAE,IAAI,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,EAAG,IAAI,CAAC;IACjB,SAAS,EAAG,IAAI,CAAC;IAGjB,MAAM,CAAC,EAAE,eAAe,EAAE,CAAC;IAC3B,uBAAuB,CAAC,EAAE,qBAAqB,EAAE,CAAC;IAClD,uBAAuB,CAAC,EAAE,qBAAqB,EAAE,CAAC;gBAEtC,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC;CAG3C"}
|
|
1
|
+
{"version":3,"file":"user.entity.d.ts","sourceRoot":"","sources":["../../../entities/users/user.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,qBAAa,UAAU;IACnB,EAAE,EAAG,MAAM,CAAC;IACZ,SAAS,EAAG,MAAM,CAAC;IACnB,KAAK,EAAG,MAAM,CAAC;IACf,QAAQ,EAAG,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,EAAG,MAAM,CAAC;IAChB,YAAY,CAAC,EAAC,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,IAAI,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kBAAkB,CAAC,EAAE,IAAI,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,SAAS,EAAG,IAAI,CAAC;IACjB,SAAS,EAAG,IAAI,CAAC;IAGjB,MAAM,CAAC,EAAE,eAAe,EAAE,CAAC;IAC3B,uBAAuB,CAAC,EAAE,qBAAqB,EAAE,CAAC;IAClD,uBAAuB,CAAC,EAAE,qBAAqB,EAAE,CAAC;gBAEtC,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC;CAG3C"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ApplicantEntity } from "../applicants/applicant.entity";
|
|
2
|
+
import { LookupEntity } from "../shared/lookup.entity";
|
|
3
|
+
import { ApplicationCompanyEntity } from "../applications/application-company.entity";
|
|
4
|
+
|
|
5
|
+
export class ApplicantShareholdingEntity {
|
|
6
|
+
id!: string;
|
|
7
|
+
companyId!: string;
|
|
8
|
+
applicantId!: string;
|
|
9
|
+
applicantName!: string;
|
|
10
|
+
directorShareholderLid?: string;
|
|
11
|
+
shareholding?: number;
|
|
12
|
+
createdAt!: Date;
|
|
13
|
+
updatedAt!: Date;
|
|
14
|
+
|
|
15
|
+
// Relations
|
|
16
|
+
company?: ApplicationCompanyEntity;
|
|
17
|
+
applicant?: ApplicantEntity;
|
|
18
|
+
directorShareholder?: LookupEntity;
|
|
19
|
+
|
|
20
|
+
constructor(partial: Partial<ApplicantShareholdingEntity>) {
|
|
21
|
+
Object.assign(this, partial);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -1,17 +1,76 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ApplicantEntity } from "../applicants/applicant.entity";
|
|
2
|
+
import { LookupEntity } from "../shared/lookup.entity";
|
|
3
|
+
import { ApplicationEntity } from "./application.entity";
|
|
4
|
+
import { ApplicantShareholdingEntity } from "../applicants/applicant-share-holding.entity";
|
|
2
5
|
|
|
3
6
|
export class ApplicationCompanyEntity {
|
|
4
7
|
id!: string;
|
|
5
8
|
applicationId!: string;
|
|
6
|
-
|
|
7
|
-
|
|
9
|
+
pageValidFlag?: boolean;
|
|
10
|
+
registeredName!: string;
|
|
11
|
+
businessTypeLid!: string;
|
|
12
|
+
registeredNumber!: number;
|
|
13
|
+
taxJurisdictionLid!: string;
|
|
14
|
+
tradingSince!: string;
|
|
15
|
+
natureOfBusiness!: string;
|
|
16
|
+
yearEnd!: string;
|
|
17
|
+
addressPostCode!: string;
|
|
18
|
+
addressLine1!: string;
|
|
19
|
+
addressLine2?: string;
|
|
20
|
+
addressLine3?: string;
|
|
21
|
+
addressCity?: string;
|
|
22
|
+
addressCountryLid!: string;
|
|
23
|
+
yearEnd1!: number;
|
|
24
|
+
turnoverYear1!: number;
|
|
25
|
+
netProfitYear1!: number;
|
|
26
|
+
yearEnd2!: number;
|
|
27
|
+
turnoverYear2!: number;
|
|
28
|
+
netProfitYear2!: number;
|
|
29
|
+
yearEnd3!: number;
|
|
30
|
+
turnoverYear3!: number;
|
|
31
|
+
netProfitYear3!: number;
|
|
32
|
+
companyCreditDefaults!: string;
|
|
33
|
+
companyCountyCourtJudgment!: string;
|
|
34
|
+
companySecuredArrears!: string;
|
|
35
|
+
companyUnsecuredArrears!: string;
|
|
36
|
+
companyBankruptcy!: string;
|
|
37
|
+
companyBankruptcyYes!: boolean;
|
|
38
|
+
companyBankruptcyNo!: boolean;
|
|
39
|
+
companyCCJInLastThreeYearYes!: boolean;
|
|
40
|
+
companyCCJInLastThreeYearNo!: boolean;
|
|
41
|
+
companyDefaultsInLastYearYes!: boolean;
|
|
42
|
+
companyDefaultsInLastYearNo!: boolean;
|
|
43
|
+
companyAnyVoluntaryEnforcedPossessionYes!: boolean;
|
|
44
|
+
companyAnyVoluntaryEnforcedPossessionNo!: boolean;
|
|
45
|
+
doYouKnowRegisteredNumber!: boolean;
|
|
46
|
+
sicCodes!: string[];
|
|
47
|
+
epc!: string;
|
|
48
|
+
remainingLease!: string;
|
|
49
|
+
dateOfIncorporation?: string;
|
|
8
50
|
createdAt!: Date;
|
|
9
51
|
updatedAt!: Date;
|
|
10
52
|
|
|
11
53
|
// Relations
|
|
12
|
-
application
|
|
54
|
+
application?: ApplicationEntity;
|
|
55
|
+
businessType?: LookupEntity;
|
|
56
|
+
taxJurisdiction?: LookupEntity;
|
|
57
|
+
addressCountry?: LookupEntity;
|
|
58
|
+
applicantShareholdings?: ApplicantShareholdingEntity[];
|
|
13
59
|
|
|
14
60
|
constructor(partial: Partial<ApplicationCompanyEntity>) {
|
|
15
61
|
Object.assign(this, partial);
|
|
16
62
|
}
|
|
17
|
-
|
|
63
|
+
|
|
64
|
+
// Virtual fields from Mongoose model
|
|
65
|
+
get businessTypeName(): string | null {
|
|
66
|
+
return this.businessType?.name ?? null;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
get taxJurisdictionName(): string | null {
|
|
70
|
+
return this.taxJurisdiction?.name ?? null;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
get addressCountryName(): string | null {
|
|
74
|
+
return this.addressCountry?.name ?? null;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
@@ -4,7 +4,6 @@ import type {
|
|
|
4
4
|
Solicitor,
|
|
5
5
|
Broker,
|
|
6
6
|
ChecklistItem,
|
|
7
|
-
Company,
|
|
8
7
|
ApplicationRationale,
|
|
9
8
|
ApplicationProduct,
|
|
10
9
|
ApplicationNote,
|
|
@@ -27,7 +26,6 @@ export type {
|
|
|
27
26
|
Solicitor,
|
|
28
27
|
Broker,
|
|
29
28
|
ChecklistItem,
|
|
30
|
-
Company,
|
|
31
29
|
ApplicationRationale,
|
|
32
30
|
ApplicationProduct,
|
|
33
31
|
ApplicationNote,
|
|
@@ -49,7 +47,6 @@ export * from './product-features.entity';
|
|
|
49
47
|
export * from './solicitor.entity';
|
|
50
48
|
export * from './broker.entity';
|
|
51
49
|
export * from './checklist-item.entity';
|
|
52
|
-
export * from './company.entity';
|
|
53
50
|
export * from './application-credit-profile.entity';
|
|
54
51
|
export * from './application-rationale.entity';
|
|
55
52
|
export * from './application-product.entity';
|
|
@@ -7,6 +7,7 @@ export class UserEntity {
|
|
|
7
7
|
fullName!: string;
|
|
8
8
|
organisationId?: string;
|
|
9
9
|
status!: number;
|
|
10
|
+
externalData?:string;
|
|
10
11
|
modifiedOn?: Date;
|
|
11
12
|
modifiedById?: number;
|
|
12
13
|
createdOnInApprivo?: Date;
|
|
@@ -14,6 +15,7 @@ export class UserEntity {
|
|
|
14
15
|
deletedOn?: Date;
|
|
15
16
|
deletedById?: number;
|
|
16
17
|
token?: string;
|
|
18
|
+
groupIds?: string[];
|
|
17
19
|
createdAt!: Date;
|
|
18
20
|
updatedAt!: Date;
|
|
19
21
|
|
package/package.json
CHANGED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
model ApplicantShareholding {
|
|
2
|
+
id String @id @default(uuid())
|
|
3
|
+
companyId String @unique @map("company_id")
|
|
4
|
+
applicantId String @map("applicant_id")
|
|
5
|
+
applicantName String @default("") @map("applicant_name")
|
|
6
|
+
directorShareholderLid String? @map("director_shareholder_lid")
|
|
7
|
+
shareholding Int? @map("shareholding")
|
|
8
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
9
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
10
|
+
|
|
11
|
+
// Relations
|
|
12
|
+
company ApplicationCompany @relation(fields: [companyId], references: [id])
|
|
13
|
+
applicant Applicant @relation("ApplicantShareholdings", fields: [applicantId], references: [id])
|
|
14
|
+
directorShareholder Lookup? @relation("DirectorShareholder", fields: [directorShareholderLid], references: [id])
|
|
15
|
+
|
|
16
|
+
@@map("applicant_shareholdings")
|
|
17
|
+
}
|
|
@@ -1,13 +1,56 @@
|
|
|
1
1
|
model ApplicationCompany {
|
|
2
|
-
id
|
|
3
|
-
applicationId
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
id String @id @default(uuid())
|
|
3
|
+
applicationId String @unique @map("application_id")
|
|
4
|
+
pageValidFlag Boolean? @default(true) @map("page_valid_flag")
|
|
5
|
+
registeredName String @map("registered_name")
|
|
6
|
+
businessTypeLid String @map("business_type_lid")
|
|
7
|
+
registeredNumber Int @map("registered_number")
|
|
8
|
+
taxJurisdictionLid String @map("tax_jurisdiction_lid")
|
|
9
|
+
tradingSince String @map("trading_since")
|
|
10
|
+
natureOfBusiness String @default("") @map("nature_of_business")
|
|
11
|
+
yearEnd String @map("year_end")
|
|
12
|
+
addressPostCode String @default("") @map("address_post_code")
|
|
13
|
+
addressLine1 String @map("address_line1")
|
|
14
|
+
addressLine2 String? @map("address_line2")
|
|
15
|
+
addressLine3 String? @map("address_line3")
|
|
16
|
+
addressCity String? @map("address_city")
|
|
17
|
+
addressCountryLid String @map("address_country_lid")
|
|
18
|
+
yearEnd1 Int @map("year_end1")
|
|
19
|
+
turnoverYear1 Decimal @default(0.00) @map("turnover_year1")
|
|
20
|
+
netProfitYear1 Decimal @default(0.00) @map("net_profit_year1")
|
|
21
|
+
yearEnd2 Int @map("year_end2")
|
|
22
|
+
turnoverYear2 Decimal @default(0.00) @map("turnover_year2")
|
|
23
|
+
netProfitYear2 Decimal @default(0.00) @map("net_profit_year2")
|
|
24
|
+
yearEnd3 Int @map("year_end3")
|
|
25
|
+
turnoverYear3 Decimal @default(0.00) @map("turnover_year3")
|
|
26
|
+
netProfitYear3 Decimal @default(0.00) @map("net_profit_year3")
|
|
27
|
+
companyCreditDefaults String @default("") @map("company_credit_defaults")
|
|
28
|
+
companyCountyCourtJudgment String @default("") @map("company_county_court_judgment")
|
|
29
|
+
companySecuredArrears String @default("") @map("company_secured_arrears")
|
|
30
|
+
companyUnsecuredArrears String @default("") @map("company_unsecured_arrears")
|
|
31
|
+
companyBankruptcy String @default("") @map("company_bankruptcy")
|
|
32
|
+
companyBankruptcyYes Boolean @default(false) @map("company_bankruptcy_yes")
|
|
33
|
+
companyBankruptcyNo Boolean @default(true) @map("company_bankruptcy_no")
|
|
34
|
+
companyCCJInLastThreeYearYes Boolean @default(false) @map("company_ccj_in_last_three_year_yes")
|
|
35
|
+
companyCCJInLastThreeYearNo Boolean @default(true) @map("company_ccj_in_last_three_year_no")
|
|
36
|
+
companyDefaultsInLastYearYes Boolean @default(false) @map("company_defaults_in_last_year_yes")
|
|
37
|
+
companyDefaultsInLastYearNo Boolean @default(true) @map("company_defaults_in_last_year_no")
|
|
38
|
+
companyAnyVoluntaryEnforcedPossessionYes Boolean @default(false) @map("company_any_voluntary_enforced_possession_yes")
|
|
39
|
+
companyAnyVoluntaryEnforcedPossessionNo Boolean @default(true) @map("company_any_voluntary_enforced_possession_no")
|
|
40
|
+
doYouKnowRegisteredNumber Boolean @default(true) @map("do_you_know_registered_number")
|
|
41
|
+
sicCodes String[] @map("sic_codes")
|
|
42
|
+
epc String @default("") @map("epc")
|
|
43
|
+
remainingLease String @default("") @map("remaining_lease")
|
|
44
|
+
dateOfIncorporation String? @map("date_of_incorporation")
|
|
45
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
46
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
8
47
|
|
|
9
48
|
// Relations
|
|
10
|
-
application
|
|
49
|
+
application Application @relation("ApplicationCompany", fields: [applicationId], references: [id])
|
|
50
|
+
businessType Lookup @relation("BusinessType", fields: [businessTypeLid], references: [id])
|
|
51
|
+
taxJurisdiction Lookup @relation("TaxJurisdiction", fields: [taxJurisdictionLid], references: [id])
|
|
52
|
+
addressCountry Lookup @relation("AddressCountry", fields: [addressCountryLid], references: [id])
|
|
53
|
+
applicantShareholdings ApplicantShareholding[]
|
|
11
54
|
|
|
12
55
|
@@map("application_companies")
|
|
13
56
|
}
|
|
@@ -73,7 +73,6 @@ model Application {
|
|
|
73
73
|
audits ApplicationAudit[]
|
|
74
74
|
underwriters Underwriter[] @relation("ApplicationUnderwriters")
|
|
75
75
|
products ApplicationProduct[] @relation("ApplicationProducts")
|
|
76
|
-
companies Company[] @relation("Company")
|
|
77
76
|
|
|
78
77
|
// Lookup relations
|
|
79
78
|
applicationType Lookup @relation("ApplicationType", fields: [applicationTypeLid], references: [id])
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Warnings:
|
|
3
|
-
|
|
4
|
-
- A unique constraint covering the columns `[commitment_id]` on the table `applicant_creditcard_commitments` will be added. If there are existing duplicate values, this will fail.
|
|
5
|
-
|
|
6
|
-
*/
|
|
7
|
-
-- CreateIndex
|
|
8
|
-
CREATE UNIQUE INDEX "applicant_creditcard_commitments_commitment_id_key" ON "applicant_creditcard_commitments"("commitment_id");
|
|
1
|
+
/*
|
|
2
|
+
Warnings:
|
|
3
|
+
|
|
4
|
+
- A unique constraint covering the columns `[commitment_id]` on the table `applicant_creditcard_commitments` will be added. If there are existing duplicate values, this will fail.
|
|
5
|
+
|
|
6
|
+
*/
|
|
7
|
+
-- CreateIndex
|
|
8
|
+
CREATE UNIQUE INDEX "applicant_creditcard_commitments_commitment_id_key" ON "applicant_creditcard_commitments"("commitment_id");
|