@dynamatix/gb-schemas 2.0.46 → 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.
Files changed (34) hide show
  1. package/dist/entities/applicants/applicant-share-holding.entity.d.ts +18 -0
  2. package/dist/entities/applicants/applicant-share-holding.entity.d.ts.map +1 -0
  3. package/dist/entities/applicants/applicant-share-holding.entity.js +5 -0
  4. package/dist/entities/applications/application-company.entity.d.ts +52 -4
  5. package/dist/entities/applications/application-company.entity.d.ts.map +1 -1
  6. package/dist/entities/applications/application-company.entity.js +10 -0
  7. package/dist/entities/applications/index.d.ts +2 -3
  8. package/dist/entities/applications/index.d.ts.map +1 -1
  9. package/dist/entities/applications/index.js +0 -1
  10. package/entities/applicants/applicant-share-holding.entity.ts +23 -0
  11. package/entities/applications/application-company.entity.ts +64 -5
  12. package/entities/applications/index.ts +0 -3
  13. package/package.json +1 -1
  14. package/prisma/applicants/applicant-share-holding.prisma +17 -0
  15. package/prisma/applications/application-company.prisma +50 -7
  16. package/prisma/applications/application.prisma +0 -1
  17. package/prisma/migrations/20250513143530_update_credit_card_commitment_schema/migration.sql +8 -8
  18. package/prisma/migrations/20250513170654_update_mortgage_commitment_schema/migration.sql +89 -89
  19. package/prisma/migrations/20250513183558_update_loan_commitment_schema/migration.sql +33 -33
  20. package/prisma/migrations/20250513184341_update_loan_commitment_schema/migration.sql +4 -4
  21. package/prisma/migrations/20250513202307_update_role_schema/migration.sql +12 -12
  22. package/prisma/migrations/20250514062536_update_role_group_schema/migration.sql +12 -12
  23. package/prisma/migrations/20250514064054_update_user_schema/migration.sql +12 -12
  24. package/prisma/migrations/20250514071524_update_user_schema/migration.sql +15 -15
  25. package/prisma/migrations/20250514072729_update_user_schema/migration.sql +18 -18
  26. package/prisma/migrations/20250514102042_update_user_rolegroup_role_schemas/migration.sql +9 -9
  27. package/prisma/migrations/20250514183537_update_application_company_schema/migration.sql +100 -0
  28. package/prisma/schema.prisma +73 -91
  29. package/prisma/shared/lookup.prisma +4 -5
  30. package/dist/entities/applications/company.entity.d.ts +0 -77
  31. package/dist/entities/applications/company.entity.d.ts.map +0 -1
  32. package/dist/entities/applications/company.entity.js +0 -23
  33. package/entities/applications/company.entity.ts +0 -102
  34. package/prisma/applications/company.prisma +0 -76
@@ -1 +0,0 @@
1
- {"version":3,"file":"company.entity.d.ts","sourceRoot":"","sources":["../../../entities/applications/company.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAGzD,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,aAAa,CAAC;IACxB,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B,mBAAmB,CAAC,EAAE,YAAY,CAAC;gBAEvB,OAAO,EAAE,OAAO,CAAC,2BAA2B,CAAC;CAG5D;AAED,qBAAa,aAAa;IACtB,EAAE,EAAG,MAAM,CAAC;IACZ,aAAa,EAAG,MAAM,CAAC;IACvB,aAAa,EAAG,OAAO,CAAC;IACxB,cAAc,EAAG,MAAM,CAAC;IACxB,eAAe,EAAG,MAAM,CAAC;IACzB,gBAAgB,EAAG,MAAM,CAAC;IAC1B,kBAAkB,EAAG,MAAM,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gBAAgB,EAAG,MAAM,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,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AAC;IAC5B,eAAe,CAAC,EAAE,YAAY,CAAC;IAC/B,cAAc,CAAC,EAAE,YAAY,CAAC;IAC9B,eAAe,CAAC,EAAE,YAAY,CAAC;IAC/B,sBAAsB,CAAC,EAAE,2BAA2B,EAAE,CAAC;gBAE3C,OAAO,EAAE,OAAO,CAAC,aAAa,CAAC;IAK3C,IAAI,gBAAgB,IAAI,MAAM,GAAG,IAAI,CAEpC;IAED,IAAI,mBAAmB,IAAI,MAAM,GAAG,IAAI,CAEvC;IAED,IAAI,kBAAkB,IAAI,MAAM,GAAG,IAAI,CAEtC;IAED,IAAI,mBAAmB,IAAI,MAAM,GAAG,IAAI,CAEvC;CACJ"}
@@ -1,23 +0,0 @@
1
- export class ApplicantShareholdingEntity {
2
- constructor(partial) {
3
- Object.assign(this, partial);
4
- }
5
- }
6
- export class CompanyEntity {
7
- constructor(partial) {
8
- Object.assign(this, partial);
9
- }
10
- // Virtual fields from Mongoose model
11
- get businessTypeName() {
12
- return this.businessType?.name ?? null;
13
- }
14
- get taxJurisdictionName() {
15
- return this.taxJurisdiction?.name ?? null;
16
- }
17
- get addressCountryName() {
18
- return this.addressCountry?.name ?? null;
19
- }
20
- get applicationTypeName() {
21
- return this.applicationType?.name ?? null;
22
- }
23
- }
@@ -1,102 +0,0 @@
1
- import { ApplicantEntity } from "../applicants/applicant.entity";
2
- import { LookupEntity } from "../shared/lookup.entity";
3
- import { ApplicationEntity } from "./application.entity";
4
-
5
-
6
- export class ApplicantShareholdingEntity {
7
- id!: string;
8
- companyId!: string;
9
- applicantId!: string;
10
- applicantName!: string;
11
- directorShareholderLid?: string;
12
- shareholding?: number;
13
- createdAt!: Date;
14
- updatedAt!: Date;
15
-
16
- // Relations
17
- company?: CompanyEntity;
18
- applicant?: ApplicantEntity;
19
- directorShareholder?: LookupEntity;
20
-
21
- constructor(partial: Partial<ApplicantShareholdingEntity>) {
22
- Object.assign(this, partial);
23
- }
24
- }
25
-
26
- export class CompanyEntity {
27
- id!: string;
28
- applicationId!: string;
29
- pageValidFlag!: boolean;
30
- registeredName!: string;
31
- businessTypeLid!: string;
32
- registeredNumber!: number;
33
- taxJurisdictionLid!: string;
34
- tradingSince?: string;
35
- natureOfBusiness!: string;
36
- yearEnd?: string;
37
- addressPostCode!: string;
38
- addressLine1!: string;
39
- addressLine2?: string;
40
- addressLine3?: string;
41
- addressCity?: string;
42
- addressCountryLid!: string;
43
- applicationTypeLid!: string;
44
- yearEnd1!: number;
45
- turnoverYear1!: number;
46
- netProfitYear1!: number;
47
- yearEnd2!: number;
48
- turnoverYear2!: number;
49
- netProfitYear2!: number;
50
- yearEnd3!: number;
51
- turnoverYear3!: number;
52
- netProfitYear3!: number;
53
- companyCreditDefaults!: string;
54
- companyCountyCourtJudgment!: string;
55
- companySecuredArrears!: string;
56
- companyUnsecuredArrears!: string;
57
- companyBankruptcy!: string;
58
- companyBankruptcyYes!: boolean;
59
- companyBankruptcyNo!: boolean;
60
- companyCCJInLastThreeYearYes!: boolean;
61
- companyCCJInLastThreeYearNo!: boolean;
62
- companyDefaultsInLastYearYes!: boolean;
63
- companyDefaultsInLastYearNo!: boolean;
64
- companyAnyVoluntaryEnforcedPossessionYes!: boolean;
65
- companyAnyVoluntaryEnforcedPossessionNo!: boolean;
66
- doYouKnowRegisteredNumber!: boolean;
67
- sicCodes!: string[];
68
- epc!: string;
69
- remainingLease!: string;
70
- dateOfIncorporation?: string;
71
- createdAt!: Date;
72
- updatedAt!: Date;
73
-
74
- // Relations
75
- application?: ApplicationEntity;
76
- businessType?: LookupEntity;
77
- taxJurisdiction?: LookupEntity;
78
- addressCountry?: LookupEntity;
79
- applicationType?: LookupEntity;
80
- applicantShareholdings?: ApplicantShareholdingEntity[];
81
-
82
- constructor(partial: Partial<CompanyEntity>) {
83
- Object.assign(this, partial);
84
- }
85
-
86
- // Virtual fields from Mongoose model
87
- get businessTypeName(): string | null {
88
- return this.businessType?.name ?? null;
89
- }
90
-
91
- get taxJurisdictionName(): string | null {
92
- return this.taxJurisdiction?.name ?? null;
93
- }
94
-
95
- get addressCountryName(): string | null {
96
- return this.addressCountry?.name ?? null;
97
- }
98
-
99
- get applicationTypeName(): string | null {
100
- return this.applicationType?.name ?? null;
101
- }
102
- }
@@ -1,76 +0,0 @@
1
- model Company {
2
- id String @id @default(uuid())
3
- applicationId String @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
- applicationTypeLid String @map("application_type_lid")
19
- yearEnd1 Int @map("year_end1")
20
- turnoverYear1 Decimal @default(0.00) @map("turnover_year1")
21
- netProfitYear1 Decimal @default(0.00) @map("net_profit_year1")
22
- yearEnd2 Int @map("year_end2")
23
- turnoverYear2 Decimal @default(0.00) @map("turnover_year2")
24
- netProfitYear2 Decimal @default(0.00) @map("net_profit_year2")
25
- yearEnd3 Int @map("year_end3")
26
- turnoverYear3 Decimal @default(0.00) @map("turnover_year3")
27
- netProfitYear3 Decimal @default(0.00) @map("net_profit_year3")
28
- companyCreditDefaults String @default("") @map("company_credit_defaults")
29
- companyCountyCourtJudgment String @default("") @map("company_county_court_judgment")
30
- companySecuredArrears String @default("") @map("company_secured_arrears")
31
- companyUnsecuredArrears String @default("") @map("company_unsecured_arrears")
32
- companyBankruptcy String @default("") @map("company_bankruptcy")
33
- companyBankruptcyYes Boolean @default(false) @map("company_bankruptcy_yes")
34
- companyBankruptcyNo Boolean @default(true) @map("company_bankruptcy_no")
35
- companyCCJInLastThreeYearYes Boolean @default(false) @map("company_ccj_in_last_three_year_yes")
36
- companyCCJInLastThreeYearNo Boolean @default(true) @map("company_ccj_in_last_three_year_no")
37
- companyDefaultsInLastYearYes Boolean @default(false) @map("company_defaults_in_last_year_yes")
38
- companyDefaultsInLastYearNo Boolean @default(true) @map("company_defaults_in_last_year_no")
39
- companyAnyVoluntaryEnforcedPossessionYes Boolean @default(false) @map("company_any_voluntary_enforced_possession_yes")
40
- companyAnyVoluntaryEnforcedPossessionNo Boolean @default(true) @map("company_any_voluntary_enforced_possession_no")
41
- doYouKnowRegisteredNumber Boolean @default(true) @map("do_you_know_registered_number")
42
- sicCodes String[] @map("sic_codes")
43
- epc String @default("") @map("epc")
44
- remainingLease String @default("") @map("remaining_lease")
45
- dateOfIncorporation String? @map("date_of_incorporation")
46
- createdAt DateTime @default(now()) @map("created_at")
47
- updatedAt DateTime @updatedAt @map("updated_at")
48
-
49
- // Relations
50
- application Application @relation("Company", fields: [applicationId], references: [id])
51
- businessType Lookup @relation("BusinessType", fields: [businessTypeLid], references: [id])
52
- taxJurisdiction Lookup @relation("TaxJurisdiction", fields: [taxJurisdictionLid], references: [id])
53
- addressCountry Lookup @relation("AddressCountry", fields: [addressCountryLid], references: [id])
54
- applicationType Lookup @relation("ApplicationType", fields: [applicationTypeLid], references: [id])
55
- applicantShareholdings ApplicantShareholding[]
56
-
57
- @@map("companies")
58
- }
59
-
60
- model ApplicantShareholding {
61
- id String @id @default(uuid())
62
- companyId String @map("company_id")
63
- applicantId String @map("applicant_id")
64
- applicantName String @default("") @map("applicant_name")
65
- directorShareholderLid String? @map("director_shareholder_lid")
66
- shareholding Int? @map("shareholding")
67
- createdAt DateTime @default(now()) @map("created_at")
68
- updatedAt DateTime @updatedAt @map("updated_at")
69
-
70
- // Relations
71
- company Company @relation(fields: [companyId], references: [id])
72
- applicant Applicant @relation("ApplicantShareholdings", fields: [applicantId], references: [id])
73
- directorShareholder Lookup? @relation("DirectorShareholder", fields: [directorShareholderLid], references: [id])
74
-
75
- @@map("applicant_shareholdings")
76
- }