@dynamatix/gb-schemas 2.0.41 → 2.0.43
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/users/role-group.entity.d.ts +1 -1
- package/dist/entities/users/user.entity.d.ts +1 -1
- package/entities/users/role-group.entity.ts +1 -1
- package/entities/users/user.entity.ts +1 -1
- package/package.json +1 -1
- package/prisma/migrations/20250514062536_update_role_group_schema/migration.sql +12 -0
- package/prisma/migrations/20250514064054_update_user_schema/migration.sql +12 -0
- package/prisma/schema.prisma +27 -27
- package/prisma/users/role-group.prisma +4 -4
- package/prisma/users/user.prisma +25 -25
package/package.json
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Warnings:
|
|
3
|
+
|
|
4
|
+
- Changed the type of `group_id` on the `role_groups` 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 "role_groups" DROP COLUMN "group_id",
|
|
9
|
+
ADD COLUMN "group_id" INTEGER NOT NULL;
|
|
10
|
+
|
|
11
|
+
-- CreateIndex
|
|
12
|
+
CREATE UNIQUE INDEX "role_groups_group_id_key" ON "role_groups"("group_id");
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Warnings:
|
|
3
|
+
|
|
4
|
+
- Changed the type of `account_id` on the `users` 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 "users" DROP COLUMN "account_id",
|
|
9
|
+
ADD COLUMN "account_id" INTEGER NOT NULL;
|
|
10
|
+
|
|
11
|
+
-- CreateIndex
|
|
12
|
+
CREATE UNIQUE INDEX "users_account_id_key" ON "users"("account_id");
|
package/prisma/schema.prisma
CHANGED
|
@@ -315,15 +315,15 @@ model Permission {
|
|
|
315
315
|
// From prisma/users/role-group.prisma
|
|
316
316
|
model RoleGroup {
|
|
317
317
|
id String @id @default(uuid())
|
|
318
|
-
groupId
|
|
318
|
+
groupId Int @unique @map("group_id")
|
|
319
319
|
name String @map("name")
|
|
320
320
|
description String? @map("description")
|
|
321
321
|
createdAt DateTime @default(now()) @map("created_at")
|
|
322
322
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
323
323
|
|
|
324
324
|
// Relations
|
|
325
|
-
roles
|
|
326
|
-
users
|
|
325
|
+
roles Role[] @relation("RoleToRoleGroup")
|
|
326
|
+
users User[] @relation("UserToRoleGroup")
|
|
327
327
|
|
|
328
328
|
@@map("role_groups")
|
|
329
329
|
}
|
|
@@ -346,32 +346,32 @@ model Role {
|
|
|
346
346
|
|
|
347
347
|
// From prisma/users/user.prisma
|
|
348
348
|
model User {
|
|
349
|
-
id
|
|
350
|
-
accountId
|
|
351
|
-
email
|
|
352
|
-
fullName
|
|
353
|
-
password
|
|
354
|
-
organisationId
|
|
355
|
-
status
|
|
356
|
-
modifiedOn
|
|
357
|
-
modifiedById
|
|
358
|
-
createdOnInApprivo
|
|
359
|
-
createdById
|
|
360
|
-
deletedOn
|
|
361
|
-
deletedById
|
|
362
|
-
token
|
|
363
|
-
createdAt
|
|
364
|
-
updatedAt
|
|
349
|
+
id String @id @default(uuid())
|
|
350
|
+
accountId Int @unique @map("account_id")
|
|
351
|
+
email String @unique
|
|
352
|
+
fullName String @map("full_name")
|
|
353
|
+
password String
|
|
354
|
+
organisationId String? @map("organisation_id")
|
|
355
|
+
status String
|
|
356
|
+
modifiedOn DateTime? @map("modified_on")
|
|
357
|
+
modifiedById String? @map("modified_by_id")
|
|
358
|
+
createdOnInApprivo DateTime? @map("created_on_in_apprivo")
|
|
359
|
+
createdById String? @map("created_by_id")
|
|
360
|
+
deletedOn DateTime? @map("deleted_on")
|
|
361
|
+
deletedById String? @map("deleted_by_id")
|
|
362
|
+
token String?
|
|
363
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
364
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
365
365
|
|
|
366
366
|
// Relations
|
|
367
|
-
groups
|
|
368
|
-
claims
|
|
367
|
+
groups RoleGroup[] @relation("UserToRoleGroup")
|
|
368
|
+
claims Claim[]
|
|
369
369
|
createdSystemParameters SystemParameter[] @relation("CreatedByUser")
|
|
370
370
|
updatedSystemParameters SystemParameter[] @relation("UpdatedByUser")
|
|
371
|
-
createdNotes
|
|
372
|
-
assignedNotes
|
|
373
|
-
alerts
|
|
374
|
-
underwriters
|
|
371
|
+
createdNotes ApplicationNote[] @relation("CreatedByUser")
|
|
372
|
+
assignedNotes ApplicationNote[] @relation("AssignedByUser")
|
|
373
|
+
alerts Alert[] @relation("UserAlerts")
|
|
374
|
+
underwriters Underwriter[] @relation("UserUnderwriters")
|
|
375
375
|
|
|
376
376
|
@@map("users")
|
|
377
377
|
}
|
|
@@ -383,9 +383,9 @@ model Claim {
|
|
|
383
383
|
userId String @map("user_id")
|
|
384
384
|
createdAt DateTime @default(now()) @map("created_at")
|
|
385
385
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
386
|
-
|
|
386
|
+
|
|
387
387
|
// Relations
|
|
388
|
-
user
|
|
388
|
+
user User @relation(fields: [userId], references: [id])
|
|
389
389
|
|
|
390
390
|
@@map("claims")
|
|
391
391
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
model RoleGroup {
|
|
2
2
|
id String @id @default(uuid())
|
|
3
|
-
groupId
|
|
3
|
+
groupId Int @unique @map("group_id")
|
|
4
4
|
name String @map("name")
|
|
5
5
|
description String? @map("description")
|
|
6
6
|
createdAt DateTime @default(now()) @map("created_at")
|
|
7
7
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
8
8
|
|
|
9
9
|
// Relations
|
|
10
|
-
roles
|
|
11
|
-
users
|
|
10
|
+
roles Role[] @relation("RoleToRoleGroup")
|
|
11
|
+
users User[] @relation("UserToRoleGroup")
|
|
12
12
|
|
|
13
13
|
@@map("role_groups")
|
|
14
|
-
}
|
|
14
|
+
}
|
package/prisma/users/user.prisma
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
model User {
|
|
2
|
-
id
|
|
3
|
-
accountId
|
|
4
|
-
email
|
|
5
|
-
fullName
|
|
6
|
-
password
|
|
7
|
-
organisationId
|
|
8
|
-
status
|
|
9
|
-
modifiedOn
|
|
10
|
-
modifiedById
|
|
11
|
-
createdOnInApprivo
|
|
12
|
-
createdById
|
|
13
|
-
deletedOn
|
|
14
|
-
deletedById
|
|
15
|
-
token
|
|
16
|
-
createdAt
|
|
17
|
-
updatedAt
|
|
2
|
+
id String @id @default(uuid())
|
|
3
|
+
accountId Int @unique @map("account_id")
|
|
4
|
+
email String @unique
|
|
5
|
+
fullName String @map("full_name")
|
|
6
|
+
password String
|
|
7
|
+
organisationId String? @map("organisation_id")
|
|
8
|
+
status String
|
|
9
|
+
modifiedOn DateTime? @map("modified_on")
|
|
10
|
+
modifiedById String? @map("modified_by_id")
|
|
11
|
+
createdOnInApprivo DateTime? @map("created_on_in_apprivo")
|
|
12
|
+
createdById String? @map("created_by_id")
|
|
13
|
+
deletedOn DateTime? @map("deleted_on")
|
|
14
|
+
deletedById String? @map("deleted_by_id")
|
|
15
|
+
token String?
|
|
16
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
17
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
18
18
|
|
|
19
19
|
// Relations
|
|
20
|
-
groups
|
|
21
|
-
claims
|
|
20
|
+
groups RoleGroup[] @relation("UserToRoleGroup")
|
|
21
|
+
claims Claim[]
|
|
22
22
|
createdSystemParameters SystemParameter[] @relation("CreatedByUser")
|
|
23
23
|
updatedSystemParameters SystemParameter[] @relation("UpdatedByUser")
|
|
24
|
-
createdNotes
|
|
25
|
-
assignedNotes
|
|
26
|
-
alerts
|
|
27
|
-
underwriters
|
|
24
|
+
createdNotes ApplicationNote[] @relation("CreatedByUser")
|
|
25
|
+
assignedNotes ApplicationNote[] @relation("AssignedByUser")
|
|
26
|
+
alerts Alert[] @relation("UserAlerts")
|
|
27
|
+
underwriters Underwriter[] @relation("UserUnderwriters")
|
|
28
28
|
|
|
29
29
|
@@map("users")
|
|
30
30
|
}
|
|
@@ -36,9 +36,9 @@ model Claim {
|
|
|
36
36
|
userId String @map("user_id")
|
|
37
37
|
createdAt DateTime @default(now()) @map("created_at")
|
|
38
38
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
39
|
-
|
|
39
|
+
|
|
40
40
|
// Relations
|
|
41
|
-
user
|
|
41
|
+
user User @relation(fields: [userId], references: [id])
|
|
42
42
|
|
|
43
43
|
@@map("claims")
|
|
44
|
-
}
|
|
44
|
+
}
|