@dynamatix/gb-schemas 2.0.49 → 2.0.51

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.
@@ -28,21 +28,21 @@ export declare class SecurityEntity {
28
28
  hasHousePlanningPermission: boolean;
29
29
  isGarage: boolean;
30
30
  isNewBuild: boolean;
31
- propertyAddressCity: string;
31
+ propertyAddressCity?: string;
32
32
  propertyAddressCountryLid: string;
33
33
  propertyAddressLine1: string;
34
- propertyAddressLine2: string;
35
- propertyAddressLine3: string;
34
+ propertyAddressLine2?: string;
35
+ propertyAddressLine3?: string;
36
36
  propertyAddressPostCode: string;
37
- propertyTenureLid: string;
38
- propertyTypeLid?: string;
37
+ propertyTenureLid?: string;
38
+ propertyTypeLid: string;
39
39
  propertyYearBuilt: number;
40
40
  receiptOfAnyDiscount: boolean;
41
41
  receiptOfDiscountDetails: string;
42
- sectorExperience: string;
42
+ sectorExperienceLid: string;
43
43
  serviceCharge: number;
44
44
  unexpiredRemainingLease: number;
45
- yearLeaseExpires: number;
45
+ yearLeaseExpires: string;
46
46
  energyEfficiencyRating?: string;
47
47
  energyEfficiencyRatingValue?: string;
48
48
  createdAt: Date;
@@ -52,6 +52,7 @@ export declare class SecurityEntity {
52
52
  propertyTenure?: LookupEntity;
53
53
  propertyType?: LookupEntity;
54
54
  dataStreet?: DataStreetEntity;
55
+ sectorExperience?: LookupEntity;
55
56
  constructor(partial: Partial<SecurityEntity>);
56
57
  }
57
58
  //# sourceMappingURL=security.entity.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"security.entity.d.ts","sourceRoot":"","sources":["../../../entities/properties/security.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,qBAAa,cAAc;IACvB,EAAE,E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EAAG,MAAM,CAAC;IACvB,uBAAuB,EAAG,MAAM,CAAC;IACjC,gBAAgB,EAAG,MAAM,CAAC;IAC1B,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,2BAA2B,CAAC,EAAE,MAAM,CAAC;IACrC,SAAS,EAAG,IAAI,CAAC;IACjB,SAAS,EAAG,IAAI,CAAC;IAGjB,WAAW,CAAC,EAAE,iBAAiB,CAAC;IAChC,sBAAsB,CAAC,EAAE,YAAY,CAAC;IACtC,cAAc,CAAC,EAAE,YAAY,CAAC;IAC9B,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,UAAU,CAAC,EAAE,gBAAgB,CAAC;gBAElB,OAAO,EAAE,OAAO,CAAC,cAAc,CAAC;CAG/C"}
1
+ {"version":3,"file":"security.entity.d.ts","sourceRoot":"","sources":["../../../entities/properties/security.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,qBAAa,cAAc;IACvB,EAAE,EAAG,MAAM,CAAC;IACZ,aAAa,EAAG,MAAM,CAAC;IACvB,aAAa,EAAG,OAAO,CAAC;IACxB,yBAAyB,EAAG,OAAO,CAAC;IACpC,0BAA0B,EAAG,OAAO,CAAC;IACrC,sBAAsB,EAAG,MAAM,CAAC;IAChC,wBAAwB,EAAG,MAAM,CAAC;IAClC,qBAAqB,EAAG,MAAM,CAAC;IAC/B,uBAAuB,EAAG,MAAM,CAAC;IACjC,uBAAuB,EAAG,OAAO,CAAC;IAClC,uBAAuB,EAAG,OAAO,CAAC;IAClC,mBAAmB,EAAG,MAAM,CAAC;IAC7B,eAAe,EAAG,OAAO,CAAC;IAC1B,UAAU,EAAG,OAAO,CAAC;IACrB,oBAAoB,EAAG,MAAM,CAAC;IAC9B,UAAU,EAAG,OAAO,CAAC;I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AAC,cAAc,CAAC;CAG/C"}
@@ -2,7 +2,7 @@ export declare class UnderwriterEntity {
2
2
  id: string;
3
3
  fullName: string;
4
4
  mandateLevel: number;
5
- underwriterId: string;
5
+ underwriterId: number;
6
6
  totalBTLCaseCount: number;
7
7
  btlPreOfferCaseCount: number;
8
8
  btlPostOfferCaseCount: number;
@@ -29,21 +29,21 @@ export class SecurityEntity {
29
29
  hasHousePlanningPermission!: boolean;
30
30
  isGarage!: boolean;
31
31
  isNewBuild!: boolean;
32
- propertyAddressCity!: string;
32
+ propertyAddressCity?: string;
33
33
  propertyAddressCountryLid!: string;
34
34
  propertyAddressLine1!: string;
35
- propertyAddressLine2!: string;
36
- propertyAddressLine3!: string;
35
+ propertyAddressLine2?: string;
36
+ propertyAddressLine3?: string;
37
37
  propertyAddressPostCode!: string;
38
- propertyTenureLid!: string;
39
- propertyTypeLid?: string;
38
+ propertyTenureLid?: string;
39
+ propertyTypeLid!: string;
40
40
  propertyYearBuilt!: number;
41
41
  receiptOfAnyDiscount!: boolean;
42
42
  receiptOfDiscountDetails!: string;
43
- sectorExperience!: string;
43
+ sectorExperienceLid!: string;
44
44
  serviceCharge!: number;
45
45
  unexpiredRemainingLease!: number;
46
- yearLeaseExpires!: number;
46
+ yearLeaseExpires!: string;
47
47
  energyEfficiencyRating?: string;
48
48
  energyEfficiencyRatingValue?: string;
49
49
  createdAt!: Date;
@@ -55,8 +55,9 @@ export class SecurityEntity {
55
55
  propertyTenure?: LookupEntity;
56
56
  propertyType?: LookupEntity;
57
57
  dataStreet?: DataStreetEntity;
58
+ sectorExperience?: LookupEntity;
58
59
 
59
60
  constructor(partial: Partial<SecurityEntity>) {
60
61
  Object.assign(this, partial);
61
62
  }
62
- }
63
+ }
@@ -2,7 +2,7 @@ export class UnderwriterEntity {
2
2
  id!: string;
3
3
  fullName!: string;
4
4
  mandateLevel!: number;
5
- underwriterId!: string;
5
+ underwriterId!: number;
6
6
  totalBTLCaseCount!: number;
7
7
  btlPreOfferCaseCount!: number;
8
8
  btlPostOfferCaseCount!: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamatix/gb-schemas",
3
- "version": "2.0.49",
3
+ "version": "2.0.51",
4
4
  "description": "All the schemas for gatehouse bank back-end",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,56 +1,56 @@
1
- /*
2
- Warnings:
3
-
4
- - You are about to drop the column `application_id` on the `underwriters` table. All the data in the column will be lost.
5
- - You are about to drop the column `assigned_date` on the `underwriters` table. All the data in the column will be lost.
6
- - You are about to drop the column `completed_date` on the `underwriters` table. All the data in the column will be lost.
7
- - You are about to drop the column `decision` on the `underwriters` table. All the data in the column will be lost.
8
- - You are about to drop the column `decision_date` on the `underwriters` table. All the data in the column will be lost.
9
- - You are about to drop the column `decision_notes` on the `underwriters` table. All the data in the column will be lost.
10
- - You are about to drop the column `risk_notes` on the `underwriters` table. All the data in the column will be lost.
11
- - You are about to drop the column `risk_rating` on the `underwriters` table. All the data in the column will be lost.
12
- - You are about to drop the column `status` on the `underwriters` table. All the data in the column will be lost.
13
- - A unique constraint covering the columns `[underwriter_id]` on the table `underwriters` will be added. If there are existing duplicate values, this will fail.
14
- - Added the required column `bridging_mandate_level` to the `underwriters` table without a default value. This is not possible if the table is not empty.
15
- - Added the required column `bridging_post_offer_case_count` to the `underwriters` table without a default value. This is not possible if the table is not empty.
16
- - Added the required column `bridging_pre_offer_case_count` to the `underwriters` table without a default value. This is not possible if the table is not empty.
17
- - Added the required column `btl_post_offer_case_count` to the `underwriters` table without a default value. This is not possible if the table is not empty.
18
- - Added the required column `btl_pre_offer_case_count` to the `underwriters` table without a default value. This is not possible if the table is not empty.
19
- - Added the required column `full_name` to the `underwriters` table without a default value. This is not possible if the table is not empty.
20
- - Added the required column `mandate_level` to the `underwriters` table without a default value. This is not possible if the table is not empty.
21
- - Added the required column `total_bridging_case_count` to the `underwriters` table without a default value. This is not possible if the table is not empty.
22
- - Added the required column `total_btl_case_count` to the `underwriters` table without a default value. This is not possible if the table is not empty.
23
-
24
- */
25
- -- DropForeignKey
26
- ALTER TABLE "underwriters" DROP CONSTRAINT "underwriters_application_id_fkey";
27
-
28
- -- DropForeignKey
29
- ALTER TABLE "underwriters" DROP CONSTRAINT "underwriters_underwriter_id_fkey";
30
-
31
- -- AlterTable
32
- ALTER TABLE "underwriters" DROP COLUMN "application_id",
33
- DROP COLUMN "assigned_date",
34
- DROP COLUMN "completed_date",
35
- DROP COLUMN "decision",
36
- DROP COLUMN "decision_date",
37
- DROP COLUMN "decision_notes",
38
- DROP COLUMN "risk_notes",
39
- DROP COLUMN "risk_rating",
40
- DROP COLUMN "status",
41
- ADD COLUMN "bridging_mandate_level" INTEGER NOT NULL,
42
- ADD COLUMN "bridging_post_offer_case_count" INTEGER NOT NULL,
43
- ADD COLUMN "bridging_pre_offer_case_count" INTEGER NOT NULL,
44
- ADD COLUMN "btl_post_offer_case_count" INTEGER NOT NULL,
45
- ADD COLUMN "btl_pre_offer_case_count" INTEGER NOT NULL,
46
- ADD COLUMN "full_name" TEXT NOT NULL,
47
- ADD COLUMN "mandate_level" INTEGER NOT NULL,
48
- ADD COLUMN "total_bridging_case_count" INTEGER NOT NULL,
49
- ADD COLUMN "total_btl_case_count" INTEGER NOT NULL,
50
- ADD COLUMN "user_id" TEXT;
51
-
52
- -- CreateIndex
53
- CREATE UNIQUE INDEX "underwriters_underwriter_id_key" ON "underwriters"("underwriter_id");
54
-
55
- -- AddForeignKey
56
- ALTER TABLE "underwriters" ADD CONSTRAINT "underwriters_user_id_fkey" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE SET NULL ON UPDATE CASCADE;
1
+ /*
2
+ Warnings:
3
+
4
+ - You are about to drop the column `application_id` on the `underwriters` table. All the data in the column will be lost.
5
+ - You are about to drop the column `assigned_date` on the `underwriters` table. All the data in the column will be lost.
6
+ - You are about to drop the column `completed_date` on the `underwriters` table. All the data in the column will be lost.
7
+ - You are about to drop the column `decision` on the `underwriters` table. All the data in the column will be lost.
8
+ - You are about to drop the column `decision_date` on the `underwriters` table. All the data in the column will be lost.
9
+ - You are about to drop the column `decision_notes` on the `underwriters` table. All the data in the column will be lost.
10
+ - You are about to drop the column `risk_notes` on the `underwriters` table. All the data in the column will be lost.
11
+ - You are about to drop the column `risk_rating` on the `underwriters` table. All the data in the column will be lost.
12
+ - You are about to drop the column `status` on the `underwriters` table. All the data in the column will be lost.
13
+ - A unique constraint covering the columns `[underwriter_id]` on the table `underwriters` will be added. If there are existing duplicate values, this will fail.
14
+ - Added the required column `bridging_mandate_level` to the `underwriters` table without a default value. This is not possible if the table is not empty.
15
+ - Added the required column `bridging_post_offer_case_count` to the `underwriters` table without a default value. This is not possible if the table is not empty.
16
+ - Added the required column `bridging_pre_offer_case_count` to the `underwriters` table without a default value. This is not possible if the table is not empty.
17
+ - Added the required column `btl_post_offer_case_count` to the `underwriters` table without a default value. This is not possible if the table is not empty.
18
+ - Added the required column `btl_pre_offer_case_count` to the `underwriters` table without a default value. This is not possible if the table is not empty.
19
+ - Added the required column `full_name` to the `underwriters` table without a default value. This is not possible if the table is not empty.
20
+ - Added the required column `mandate_level` to the `underwriters` table without a default value. This is not possible if the table is not empty.
21
+ - Added the required column `total_bridging_case_count` to the `underwriters` table without a default value. This is not possible if the table is not empty.
22
+ - Added the required column `total_btl_case_count` to the `underwriters` table without a default value. This is not possible if the table is not empty.
23
+
24
+ */
25
+ -- DropForeignKey
26
+ ALTER TABLE "underwriters" DROP CONSTRAINT "underwriters_application_id_fkey";
27
+
28
+ -- DropForeignKey
29
+ ALTER TABLE "underwriters" DROP CONSTRAINT "underwriters_underwriter_id_fkey";
30
+
31
+ -- AlterTable
32
+ ALTER TABLE "underwriters" DROP COLUMN "application_id",
33
+ DROP COLUMN "assigned_date",
34
+ DROP COLUMN "completed_date",
35
+ DROP COLUMN "decision",
36
+ DROP COLUMN "decision_date",
37
+ DROP COLUMN "decision_notes",
38
+ DROP COLUMN "risk_notes",
39
+ DROP COLUMN "risk_rating",
40
+ DROP COLUMN "status",
41
+ ADD COLUMN "bridging_mandate_level" INTEGER NOT NULL,
42
+ ADD COLUMN "bridging_post_offer_case_count" INTEGER NOT NULL,
43
+ ADD COLUMN "bridging_pre_offer_case_count" INTEGER NOT NULL,
44
+ ADD COLUMN "btl_post_offer_case_count" INTEGER NOT NULL,
45
+ ADD COLUMN "btl_pre_offer_case_count" INTEGER NOT NULL,
46
+ ADD COLUMN "full_name" TEXT NOT NULL,
47
+ ADD COLUMN "mandate_level" INTEGER NOT NULL,
48
+ ADD COLUMN "total_bridging_case_count" INTEGER NOT NULL,
49
+ ADD COLUMN "total_btl_case_count" INTEGER NOT NULL,
50
+ ADD COLUMN "user_id" TEXT;
51
+
52
+ -- CreateIndex
53
+ CREATE UNIQUE INDEX "underwriters_underwriter_id_key" ON "underwriters"("underwriter_id");
54
+
55
+ -- AddForeignKey
56
+ ALTER TABLE "underwriters" ADD CONSTRAINT "underwriters_user_id_fkey" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE SET NULL ON UPDATE CASCADE;
@@ -0,0 +1,12 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - Changed the type of `underwriter_id` on the `underwriters` table. No cast exists, the column would be dropped and recreated, which cannot be done if there is data, since the column is required.
5
+
6
+ */
7
+ -- AlterTable
8
+ ALTER TABLE "underwriters" DROP COLUMN "underwriter_id",
9
+ ADD COLUMN "underwriter_id" INTEGER NOT NULL;
10
+
11
+ -- CreateIndex
12
+ CREATE UNIQUE INDEX "underwriters_underwriter_id_key" ON "underwriters"("underwriter_id");
@@ -0,0 +1,43 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - You are about to drop the column `sector_experience` on the `securities` table. All the data in the column will be lost.
5
+ - Added the required column `sector_experience_lid` to the `securities` table without a default value. This is not possible if the table is not empty.
6
+ - Made the column `property_type_lid` on table `securities` required. This step will fail if there are existing NULL values in that column.
7
+
8
+ */
9
+ -- DropForeignKey
10
+ ALTER TABLE "securities" DROP CONSTRAINT "securities_property_tenure_lid_fkey";
11
+
12
+ -- DropForeignKey
13
+ ALTER TABLE "securities" DROP CONSTRAINT "securities_property_type_lid_fkey";
14
+
15
+ -- AlterTable
16
+ ALTER TABLE "securities" DROP COLUMN "sector_experience",
17
+ ADD COLUMN "sector_experience_lid" TEXT NOT NULL,
18
+ ALTER COLUMN "construction_details" DROP DEFAULT,
19
+ ALTER COLUMN "flat_number_of_bedrooms" DROP DEFAULT,
20
+ ALTER COLUMN "is_ground_rent" DROP DEFAULT,
21
+ ALTER COLUMN "house_number_of_living_rooms" DROP DEFAULT,
22
+ ALTER COLUMN "house_number_of_tenancies" DROP DEFAULT,
23
+ ALTER COLUMN "property_address_city" DROP NOT NULL,
24
+ ALTER COLUMN "property_address_city" DROP DEFAULT,
25
+ ALTER COLUMN "property_address_line1" DROP DEFAULT,
26
+ ALTER COLUMN "property_address_line2" DROP NOT NULL,
27
+ ALTER COLUMN "property_address_line3" DROP NOT NULL,
28
+ ALTER COLUMN "property_address_post_code" DROP DEFAULT,
29
+ ALTER COLUMN "property_tenure_lid" DROP NOT NULL,
30
+ ALTER COLUMN "property_type_lid" SET NOT NULL,
31
+ ALTER COLUMN "property_year_built" DROP DEFAULT,
32
+ ALTER COLUMN "receipt_of_discount_details" DROP DEFAULT,
33
+ ALTER COLUMN "service_charge" DROP DEFAULT,
34
+ ALTER COLUMN "unexpired_remaining_lease" DROP DEFAULT;
35
+
36
+ -- AddForeignKey
37
+ ALTER TABLE "securities" ADD CONSTRAINT "securities_property_tenure_lid_fkey" FOREIGN KEY ("property_tenure_lid") REFERENCES "lookups"("id") ON DELETE SET NULL ON UPDATE CASCADE;
38
+
39
+ -- AddForeignKey
40
+ ALTER TABLE "securities" ADD CONSTRAINT "securities_property_type_lid_fkey" FOREIGN KEY ("property_type_lid") REFERENCES "lookups"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
41
+
42
+ -- AddForeignKey
43
+ ALTER TABLE "securities" ADD CONSTRAINT "securities_sector_experience_lid_fkey" FOREIGN KEY ("sector_experience_lid") REFERENCES "lookups"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
@@ -10,35 +10,35 @@ model Security {
10
10
  totalOutstandingBalance Decimal @default(0.00) @map("total_outstanding_balance")
11
11
  areAllBedRoomsOver10sqm Boolean @default(false) @map("are_all_bed_rooms_over_10sqm")
12
12
  isBrickTileConstruction Boolean @default(false) @map("is_brick_tile_construction")
13
- constructionDetails String @default("") @map("construction_details")
13
+ constructionDetails String @map("construction_details")
14
14
  isExLAExclusion Boolean @default(false) @map("is_ex_la_exclusion")
15
15
  isFlatLift Boolean @default(false) @map("is_flat_lift")
16
- flatNumberOfBedrooms Int @default(0) @map("flat_number_of_bedrooms")
16
+ flatNumberOfBedrooms Int @map("flat_number_of_bedrooms")
17
17
  isGreenEPC Boolean @default(false) @map("is_green_epc")
18
- isGroundRent Decimal @default(0.00) @map("is_ground_rent")
18
+ isGroundRent Decimal @map("is_ground_rent")
19
19
  isHouseLicensed Boolean @default(false) @map("is_house_licensed")
20
20
  houseNumberOfFloors Int @default(0) @map("house_number_of_floors")
21
21
  houseNumberOfKitchens Int @default(0) @map("house_number_of_kitchens")
22
- houseNumberOfLivingRooms Int @default(0) @map("house_number_of_living_rooms")
22
+ houseNumberOfLivingRooms Int @map("house_number_of_living_rooms")
23
23
  houseNumberOfBathrooms Int @default(0) @map("house_number_of_bathrooms")
24
- houseNumberOfTenancies Int @default(0) @map("house_number_of_tenancies")
24
+ houseNumberOfTenancies Int @map("house_number_of_tenancies")
25
25
  hasHousePlanningPermission Boolean @default(false) @map("has_house_planning_permission")
26
26
  isGarage Boolean @default(false) @map("is_garage")
27
27
  isNewBuild Boolean @default(false) @map("is_new_build")
28
- propertyAddressCity String @default("") @map("property_address_city")
28
+ propertyAddressCity String? @map("property_address_city")
29
29
  propertyAddressCountryLid String @map("property_address_country_lid")
30
- propertyAddressLine1 String @default("") @map("property_address_line1")
31
- propertyAddressLine2 String @default("") @map("property_address_line2")
32
- propertyAddressLine3 String @default("") @map("property_address_line3")
33
- propertyAddressPostCode String @default("") @map("property_address_post_code")
34
- propertyTenureLid String @map("property_tenure_lid")
35
- propertyTypeLid String? @map("property_type_lid")
36
- propertyYearBuilt Int @default(0) @map("property_year_built")
30
+ propertyAddressLine1 String @map("property_address_line1")
31
+ propertyAddressLine2 String? @default("") @map("property_address_line2")
32
+ propertyAddressLine3 String? @default("") @map("property_address_line3")
33
+ propertyAddressPostCode String @map("property_address_post_code")
34
+ propertyTenureLid String? @map("property_tenure_lid")
35
+ propertyTypeLid String @map("property_type_lid")
36
+ propertyYearBuilt Int @map("property_year_built")
37
37
  receiptOfAnyDiscount Boolean @default(false) @map("receipt_of_any_discount")
38
- receiptOfDiscountDetails String @default("") @map("receipt_of_discount_details")
39
- sectorExperience String @default("") @map("sector_experience")
40
- serviceCharge Decimal @default(0.00) @map("service_charge")
41
- unexpiredRemainingLease Int @default(0) @map("unexpired_remaining_lease")
38
+ receiptOfDiscountDetails String @map("receipt_of_discount_details")
39
+ sectorExperienceLid String @map("sector_experience_lid")
40
+ serviceCharge Decimal @map("service_charge")
41
+ unexpiredRemainingLease Int @map("unexpired_remaining_lease")
42
42
  yearLeaseExpires Int @default(0) @map("year_lease_expires")
43
43
  energyEfficiencyRating String? @map("energy_efficiency_rating")
44
44
  energyEfficiencyRatingValue String? @map("energy_efficiency_rating_value")
@@ -46,11 +46,12 @@ model Security {
46
46
  updatedAt DateTime @updatedAt @map("updated_at")
47
47
 
48
48
  // Relations
49
- application Application @relation("ApplicationSecurity", fields: [applicationId], references: [id])
50
- propertyAddressCountry Lookup @relation("PropertyAddressCountry", fields: [propertyAddressCountryLid], references: [id])
51
- propertyTenure Lookup @relation("PropertyTenure", fields: [propertyTenureLid], references: [id])
52
- propertyType Lookup? @relation("PropertyType", fields: [propertyTypeLid], references: [id])
53
- dataStreet DataStreet?
49
+ application Application @relation("ApplicationSecurity", fields: [applicationId], references: [id])
50
+ propertyAddressCountry Lookup @relation("PropertyAddressCountry", fields: [propertyAddressCountryLid], references: [id])
51
+ propertyTenure Lookup? @relation("PropertyTenure", fields: [propertyTenureLid], references: [id])
52
+ propertyType Lookup @relation("PropertyType", fields: [propertyTypeLid], references: [id])
53
+ sectorExperience Lookup @relation("SectorExperience", fields: [sectorExperienceLid], references: [id])
54
+ dataStreet DataStreet?
54
55
 
55
56
  @@map("securities")
56
57
  }
@@ -74,7 +75,7 @@ model DataStreet {
74
75
  updatedAt DateTime @updatedAt @map("updated_at")
75
76
 
76
77
  // Relations
77
- security Security @relation(fields: [securityId], references: [id])
78
+ security Security @relation(fields: [securityId], references: [id])
78
79
 
79
80
  @@map("data_streets")
80
- }
81
+ }
@@ -199,6 +199,7 @@ model Lookup {
199
199
  propertyAddressCountry_securities Security[] @relation("PropertyAddressCountry")
200
200
  propertyTenure_securities Security[] @relation("PropertyTenure")
201
201
  propertyType_securities Security[] @relation("PropertyType")
202
+ sectorExperience_securities Security[] @relation("SectorExperience")
202
203
 
203
204
  // MortgageCommitment Relations
204
205
  repaymentType_mortgageCommitments MortgageCommitment[] @relation("RepaymentType")
@@ -1786,35 +1787,35 @@ model Security {
1786
1787
  totalOutstandingBalance Decimal @default(0.00) @map("total_outstanding_balance")
1787
1788
  areAllBedRoomsOver10sqm Boolean @default(false) @map("are_all_bed_rooms_over_10sqm")
1788
1789
  isBrickTileConstruction Boolean @default(false) @map("is_brick_tile_construction")
1789
- constructionDetails String @default("") @map("construction_details")
1790
+ constructionDetails String @map("construction_details")
1790
1791
  isExLAExclusion Boolean @default(false) @map("is_ex_la_exclusion")
1791
1792
  isFlatLift Boolean @default(false) @map("is_flat_lift")
1792
- flatNumberOfBedrooms Int @default(0) @map("flat_number_of_bedrooms")
1793
+ flatNumberOfBedrooms Int @map("flat_number_of_bedrooms")
1793
1794
  isGreenEPC Boolean @default(false) @map("is_green_epc")
1794
- isGroundRent Decimal @default(0.00) @map("is_ground_rent")
1795
+ isGroundRent Decimal @map("is_ground_rent")
1795
1796
  isHouseLicensed Boolean @default(false) @map("is_house_licensed")
1796
1797
  houseNumberOfFloors Int @default(0) @map("house_number_of_floors")
1797
1798
  houseNumberOfKitchens Int @default(0) @map("house_number_of_kitchens")
1798
- houseNumberOfLivingRooms Int @default(0) @map("house_number_of_living_rooms")
1799
+ houseNumberOfLivingRooms Int @map("house_number_of_living_rooms")
1799
1800
  houseNumberOfBathrooms Int @default(0) @map("house_number_of_bathrooms")
1800
- houseNumberOfTenancies Int @default(0) @map("house_number_of_tenancies")
1801
+ houseNumberOfTenancies Int @map("house_number_of_tenancies")
1801
1802
  hasHousePlanningPermission Boolean @default(false) @map("has_house_planning_permission")
1802
1803
  isGarage Boolean @default(false) @map("is_garage")
1803
1804
  isNewBuild Boolean @default(false) @map("is_new_build")
1804
- propertyAddressCity String @default("") @map("property_address_city")
1805
+ propertyAddressCity String? @map("property_address_city")
1805
1806
  propertyAddressCountryLid String @map("property_address_country_lid")
1806
- propertyAddressLine1 String @default("") @map("property_address_line1")
1807
- propertyAddressLine2 String @default("") @map("property_address_line2")
1808
- propertyAddressLine3 String @default("") @map("property_address_line3")
1809
- propertyAddressPostCode String @default("") @map("property_address_post_code")
1810
- propertyTenureLid String @map("property_tenure_lid")
1811
- propertyTypeLid String? @map("property_type_lid")
1812
- propertyYearBuilt Int @default(0) @map("property_year_built")
1807
+ propertyAddressLine1 String @map("property_address_line1")
1808
+ propertyAddressLine2 String? @default("") @map("property_address_line2")
1809
+ propertyAddressLine3 String? @default("") @map("property_address_line3")
1810
+ propertyAddressPostCode String @map("property_address_post_code")
1811
+ propertyTenureLid String? @map("property_tenure_lid")
1812
+ propertyTypeLid String @map("property_type_lid")
1813
+ propertyYearBuilt Int @map("property_year_built")
1813
1814
  receiptOfAnyDiscount Boolean @default(false) @map("receipt_of_any_discount")
1814
- receiptOfDiscountDetails String @default("") @map("receipt_of_discount_details")
1815
- sectorExperience String @default("") @map("sector_experience")
1816
- serviceCharge Decimal @default(0.00) @map("service_charge")
1817
- unexpiredRemainingLease Int @default(0) @map("unexpired_remaining_lease")
1815
+ receiptOfDiscountDetails String @map("receipt_of_discount_details")
1816
+ sectorExperienceLid String @map("sector_experience_lid")
1817
+ serviceCharge Decimal @map("service_charge")
1818
+ unexpiredRemainingLease Int @map("unexpired_remaining_lease")
1818
1819
  yearLeaseExpires Int @default(0) @map("year_lease_expires")
1819
1820
  energyEfficiencyRating String? @map("energy_efficiency_rating")
1820
1821
  energyEfficiencyRatingValue String? @map("energy_efficiency_rating_value")
@@ -1822,11 +1823,12 @@ model Security {
1822
1823
  updatedAt DateTime @updatedAt @map("updated_at")
1823
1824
 
1824
1825
  // Relations
1825
- application Application @relation("ApplicationSecurity", fields: [applicationId], references: [id])
1826
- propertyAddressCountry Lookup @relation("PropertyAddressCountry", fields: [propertyAddressCountryLid], references: [id])
1827
- propertyTenure Lookup @relation("PropertyTenure", fields: [propertyTenureLid], references: [id])
1828
- propertyType Lookup? @relation("PropertyType", fields: [propertyTypeLid], references: [id])
1829
- dataStreet DataStreet?
1826
+ application Application @relation("ApplicationSecurity", fields: [applicationId], references: [id])
1827
+ propertyAddressCountry Lookup @relation("PropertyAddressCountry", fields: [propertyAddressCountryLid], references: [id])
1828
+ propertyTenure Lookup? @relation("PropertyTenure", fields: [propertyTenureLid], references: [id])
1829
+ propertyType Lookup @relation("PropertyType", fields: [propertyTypeLid], references: [id])
1830
+ sectorExperience Lookup @relation("SectorExperience", fields: [sectorExperienceLid], references: [id])
1831
+ dataStreet DataStreet?
1830
1832
 
1831
1833
  @@map("securities")
1832
1834
  }
@@ -1850,7 +1852,7 @@ model DataStreet {
1850
1852
  updatedAt DateTime @updatedAt @map("updated_at")
1851
1853
 
1852
1854
  // Relations
1853
- security Security @relation(fields: [securityId], references: [id])
1855
+ security Security @relation(fields: [securityId], references: [id])
1854
1856
 
1855
1857
  @@map("data_streets")
1856
1858
  }
@@ -1860,7 +1862,7 @@ model Underwriter {
1860
1862
  id String @id @default(uuid())
1861
1863
  fullName String @map("full_name")
1862
1864
  mandateLevel Int @map("mandate_level")
1863
- underwriterId String @unique @map("underwriter_id")
1865
+ underwriterId Int @unique @map("underwriter_id")
1864
1866
  totalBTLCaseCount Int @map("total_btl_case_count")
1865
1867
  btlPreOfferCaseCount Int @map("btl_pre_offer_case_count")
1866
1868
  btlPostOfferCaseCount Int @map("btl_post_offer_case_count")
@@ -1870,7 +1872,7 @@ model Underwriter {
1870
1872
  bridgingMandateLevel Int @map("bridging_mandate_level")
1871
1873
  createdAt DateTime @default(now()) @map("created_at")
1872
1874
  updatedAt DateTime @updatedAt @map("updated_at")
1873
- userId String? @map("user_id")
1875
+ userId String? @map("user_id")
1874
1876
  user User? @relation("UserUnderwriters", fields: [userId], references: [id])
1875
1877
 
1876
1878
  @@map("underwriters")
@@ -78,6 +78,7 @@ model Lookup {
78
78
  propertyAddressCountry_securities Security[] @relation("PropertyAddressCountry")
79
79
  propertyTenure_securities Security[] @relation("PropertyTenure")
80
80
  propertyType_securities Security[] @relation("PropertyType")
81
+ sectorExperience_securities Security[] @relation("SectorExperience")
81
82
 
82
83
  // MortgageCommitment Relations
83
84
  repaymentType_mortgageCommitments MortgageCommitment[] @relation("RepaymentType")
@@ -2,7 +2,7 @@ model Underwriter {
2
2
  id String @id @default(uuid())
3
3
  fullName String @map("full_name")
4
4
  mandateLevel Int @map("mandate_level")
5
- underwriterId String @unique @map("underwriter_id")
5
+ underwriterId Int @unique @map("underwriter_id")
6
6
  totalBTLCaseCount Int @map("total_btl_case_count")
7
7
  btlPreOfferCaseCount Int @map("btl_pre_offer_case_count")
8
8
  btlPostOfferCaseCount Int @map("btl_post_offer_case_count")
@@ -12,7 +12,7 @@ model Underwriter {
12
12
  bridgingMandateLevel Int @map("bridging_mandate_level")
13
13
  createdAt DateTime @default(now()) @map("created_at")
14
14
  updatedAt DateTime @updatedAt @map("updated_at")
15
- userId String? @map("user_id")
15
+ userId String? @map("user_id")
16
16
  user User? @relation("UserUnderwriters", fields: [userId], references: [id])
17
17
 
18
18
  @@map("underwriters")