@dynamatix/gb-schemas 2.0.13 → 2.0.14

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamatix/gb-schemas",
3
- "version": "2.0.13",
3
+ "version": "2.0.14",
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,35 +1,35 @@
1
1
  model ApplicationNote {
2
- id String @id @default(uuid())
3
- applicationId String @map("application_id")
4
- noteId String? @map("note_id")
5
- createdOn String? @map("created_on")
6
- createdBy String? @map("created_by")
7
- username String? @map("username")
8
- createdByUserId String? @map("created_by_user_id")
9
- typeLid String? @map("type_lid")
10
- subTypeLid String? @map("sub_type_lid")
11
- subject String? @map("subject")
12
- note String @map("note")
13
- reminderDate String? @map("reminder_date")
2
+ id String @id @default(uuid())
3
+ applicationId String @unique @map("application_id")
4
+ noteId String? @map("note_id")
5
+ createdOn String? @map("created_on")
6
+ createdBy String? @map("created_by")
7
+ username String? @map("username")
8
+ createdByUserId String? @map("created_by_user_id")
9
+ typeLid String? @map("type_lid")
10
+ subTypeLid String? @map("sub_type_lid")
11
+ subject String? @map("subject")
12
+ note String @map("note")
13
+ reminderDate String? @map("reminder_date")
14
14
  attachmentDocumentId String? @map("attachment_document_id")
15
- assignedOperation String @default("") @map("assigned_operation")
16
- autoCreated String @default("false") @map("auto_created")
17
- additionalData Json? @map("additional_data")
18
- autoCreatedId String? @map("auto_created_id")
19
- assignedTo String @default("") @map("assigned_to")
20
- assignedBy String? @map("assigned_by")
21
- assignedByUserId String? @map("assigned_by_user_id")
22
- comment String? @map("comment")
23
- reminderStatus String @default("None") @map("reminder_status")
24
- createdAt DateTime @default(now()) @map("created_at")
25
- updatedAt DateTime @updatedAt @map("updated_at")
15
+ assignedOperation String @default("") @map("assigned_operation")
16
+ autoCreated String @default("false") @map("auto_created")
17
+ additionalData Json? @map("additional_data")
18
+ autoCreatedId String? @map("auto_created_id")
19
+ assignedTo String @default("") @map("assigned_to")
20
+ assignedBy String? @map("assigned_by")
21
+ assignedByUserId String? @map("assigned_by_user_id")
22
+ comment String? @map("comment")
23
+ reminderStatus String @default("None") @map("reminder_status")
24
+ createdAt DateTime @default(now()) @map("created_at")
25
+ updatedAt DateTime @updatedAt @map("updated_at")
26
26
 
27
27
  // Relations
28
- application Application @relation(fields: [applicationId], references: [id])
29
- type Lookup? @relation("NoteType", fields: [typeLid], references: [id])
30
- subType Lookup? @relation("NoteSubType", fields: [subTypeLid], references: [id])
31
- createdByUser User? @relation("CreatedByUser", fields: [createdByUserId], references: [id])
32
- assignedByUser User? @relation("AssignedByUser", fields: [assignedByUserId], references: [id])
28
+ application Application @relation(fields: [applicationId], references: [id])
29
+ type Lookup? @relation("NoteType", fields: [typeLid], references: [id])
30
+ subType Lookup? @relation("NoteSubType", fields: [subTypeLid], references: [id])
31
+ createdByUser User? @relation("CreatedByUser", fields: [createdByUserId], references: [id])
32
+ assignedByUser User? @relation("AssignedByUser", fields: [assignedByUserId], references: [id])
33
33
 
34
34
  @@map("application_notes")
35
- }
35
+ }
@@ -1,28 +1,27 @@
1
1
  model Broker {
2
- id String @id @default(uuid())
3
- applicationId String @map("application_id")
4
- brokerId String? @map("broker_id")
5
- landlinePhone String? @map("landline_phone")
6
- mobileTelephone String? @map("mobile_telephone")
7
- addressPostCode String? @map("address_post_code")
8
- addressLine1 String? @map("address_line1")
9
- addressLine2 String? @map("address_line2")
10
- addressLine3 String? @map("address_line3")
11
- addressCity String? @map("address_city")
12
- addressCountry String? @map("address_country")
13
- tradingName String? @map("trading_name")
14
- fcaNumber String? @map("fca_number")
15
- brokerType String? @map("broker_type")
16
- email String? @map("email")
17
- network String? @map("network")
18
- firstName String? @map("first_name")
19
- lastName String? @map("last_name")
20
- createdAt DateTime @default(now()) @map("created_at")
21
- updatedAt DateTime @updatedAt @map("updated_at")
22
-
2
+ id String @id @default(uuid())
3
+ applicationId String @unique @map("application_id")
4
+ brokerId String? @map("broker_id")
5
+ landlinePhone String? @map("landline_phone")
6
+ mobileTelephone String? @map("mobile_telephone")
7
+ addressPostCode String? @map("address_post_code")
8
+ addressLine1 String? @map("address_line1")
9
+ addressLine2 String? @map("address_line2")
10
+ addressLine3 String? @map("address_line3")
11
+ addressCity String? @map("address_city")
12
+ addressCountry String? @map("address_country")
13
+ tradingName String? @map("trading_name")
14
+ fcaNumber String? @map("fca_number")
15
+ brokerType String? @map("broker_type")
16
+ email String? @map("email")
17
+ network String? @map("network")
18
+ firstName String? @map("first_name")
19
+ lastName String? @map("last_name")
20
+ createdAt DateTime @default(now()) @map("created_at")
21
+ updatedAt DateTime @updatedAt @map("updated_at")
22
+
23
23
  // Relations
24
24
  applications Application[] @relation("ApplicationBroker")
25
25
 
26
-
27
26
  @@map("brokers")
28
27
  }
@@ -0,0 +1,12 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - A unique constraint covering the columns `[application_id]` on the table `application_notes` will be added. If there are existing duplicate values, this will fail.
5
+ - A unique constraint covering the columns `[application_id]` on the table `brokers` will be added. If there are existing duplicate values, this will fail.
6
+
7
+ */
8
+ -- CreateIndex
9
+ CREATE UNIQUE INDEX "application_notes_application_id_key" ON "application_notes"("application_id");
10
+
11
+ -- CreateIndex
12
+ CREATE UNIQUE INDEX "brokers_application_id_key" ON "brokers"("application_id");
@@ -1262,37 +1262,37 @@ model ApplicationMortgage {
1262
1262
 
1263
1263
  // From prisma/applications/application-note.prisma
1264
1264
  model ApplicationNote {
1265
- id String @id @default(uuid())
1266
- applicationId String @map("application_id")
1267
- noteId String? @map("note_id")
1268
- createdOn String? @map("created_on")
1269
- createdBy String? @map("created_by")
1270
- username String? @map("username")
1271
- createdByUserId String? @map("created_by_user_id")
1272
- typeLid String? @map("type_lid")
1273
- subTypeLid String? @map("sub_type_lid")
1274
- subject String? @map("subject")
1275
- note String @map("note")
1276
- reminderDate String? @map("reminder_date")
1265
+ id String @id @default(uuid())
1266
+ applicationId String @unique @map("application_id")
1267
+ noteId String? @map("note_id")
1268
+ createdOn String? @map("created_on")
1269
+ createdBy String? @map("created_by")
1270
+ username String? @map("username")
1271
+ createdByUserId String? @map("created_by_user_id")
1272
+ typeLid String? @map("type_lid")
1273
+ subTypeLid String? @map("sub_type_lid")
1274
+ subject String? @map("subject")
1275
+ note String @map("note")
1276
+ reminderDate String? @map("reminder_date")
1277
1277
  attachmentDocumentId String? @map("attachment_document_id")
1278
- assignedOperation String @default("") @map("assigned_operation")
1279
- autoCreated String @default("false") @map("auto_created")
1280
- additionalData Json? @map("additional_data")
1281
- autoCreatedId String? @map("auto_created_id")
1282
- assignedTo String @default("") @map("assigned_to")
1283
- assignedBy String? @map("assigned_by")
1284
- assignedByUserId String? @map("assigned_by_user_id")
1285
- comment String? @map("comment")
1286
- reminderStatus String @default("None") @map("reminder_status")
1287
- createdAt DateTime @default(now()) @map("created_at")
1288
- updatedAt DateTime @updatedAt @map("updated_at")
1278
+ assignedOperation String @default("") @map("assigned_operation")
1279
+ autoCreated String @default("false") @map("auto_created")
1280
+ additionalData Json? @map("additional_data")
1281
+ autoCreatedId String? @map("auto_created_id")
1282
+ assignedTo String @default("") @map("assigned_to")
1283
+ assignedBy String? @map("assigned_by")
1284
+ assignedByUserId String? @map("assigned_by_user_id")
1285
+ comment String? @map("comment")
1286
+ reminderStatus String @default("None") @map("reminder_status")
1287
+ createdAt DateTime @default(now()) @map("created_at")
1288
+ updatedAt DateTime @updatedAt @map("updated_at")
1289
1289
 
1290
1290
  // Relations
1291
- application Application @relation(fields: [applicationId], references: [id])
1292
- type Lookup? @relation("NoteType", fields: [typeLid], references: [id])
1293
- subType Lookup? @relation("NoteSubType", fields: [subTypeLid], references: [id])
1294
- createdByUser User? @relation("CreatedByUser", fields: [createdByUserId], references: [id])
1295
- assignedByUser User? @relation("AssignedByUser", fields: [assignedByUserId], references: [id])
1291
+ application Application @relation(fields: [applicationId], references: [id])
1292
+ type Lookup? @relation("NoteType", fields: [typeLid], references: [id])
1293
+ subType Lookup? @relation("NoteSubType", fields: [subTypeLid], references: [id])
1294
+ createdByUser User? @relation("CreatedByUser", fields: [createdByUserId], references: [id])
1295
+ assignedByUser User? @relation("AssignedByUser", fields: [assignedByUserId], references: [id])
1296
1296
 
1297
1297
  @@map("application_notes")
1298
1298
  }
@@ -1504,7 +1504,7 @@ model Application {
1504
1504
  // From prisma/applications/broker.prisma
1505
1505
  model Broker {
1506
1506
  id String @id @default(uuid())
1507
- applicationId String @map("application_id")
1507
+ applicationId String @unique @map("application_id")
1508
1508
  brokerId String? @map("broker_id")
1509
1509
  landlinePhone String? @map("landline_phone")
1510
1510
  mobileTelephone String? @map("mobile_telephone")