@dynamatix/gb-schemas 2.0.44 → 2.0.46
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 -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 +6 -4
- package/dist/entities/users/user.entity.d.ts.map +1 -1
- package/entities/users/role-group.entity.ts +1 -0
- package/entities/users/role.entity.ts +2 -0
- package/entities/users/user.entity.ts +6 -4
- package/package.json +1 -1
- package/prisma/migrations/20250514072729_update_user_schema/migration.sql +18 -0
- package/prisma/migrations/20250514102042_update_user_rolegroup_role_schemas/migration.sql +9 -0
- package/prisma/schema.prisma +14 -10
- package/prisma/users/role-group.prisma +1 -0
- package/prisma/users/role.prisma +7 -6
- package/prisma/users/user.prisma +7 -5
|
@@ -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"}
|
|
@@ -6,14 +6,16 @@ export declare class UserEntity {
|
|
|
6
6
|
email: string;
|
|
7
7
|
fullName: string;
|
|
8
8
|
organisationId?: string;
|
|
9
|
-
status:
|
|
9
|
+
status: number;
|
|
10
|
+
externalData?: string;
|
|
10
11
|
modifiedOn?: Date;
|
|
11
|
-
modifiedById?:
|
|
12
|
+
modifiedById?: number;
|
|
12
13
|
createdOnInApprivo?: Date;
|
|
13
|
-
createdById?:
|
|
14
|
+
createdById?: number;
|
|
14
15
|
deletedOn?: Date;
|
|
15
|
-
deletedById?:
|
|
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,CA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GjB,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"}
|
|
@@ -6,14 +6,16 @@ export class UserEntity {
|
|
|
6
6
|
email!: string;
|
|
7
7
|
fullName!: string;
|
|
8
8
|
organisationId?: string;
|
|
9
|
-
status!:
|
|
9
|
+
status!: number;
|
|
10
|
+
externalData?:string;
|
|
10
11
|
modifiedOn?: Date;
|
|
11
|
-
modifiedById?:
|
|
12
|
+
modifiedById?: number;
|
|
12
13
|
createdOnInApprivo?: Date;
|
|
13
|
-
createdById?:
|
|
14
|
+
createdById?: number;
|
|
14
15
|
deletedOn?: Date;
|
|
15
|
-
deletedById?:
|
|
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,18 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Warnings:
|
|
3
|
+
|
|
4
|
+
- The `modified_by_id` column on the `users` table would be dropped and recreated. This will lead to data loss if there is data in the column.
|
|
5
|
+
- The `created_by_id` column on the `users` table would be dropped and recreated. This will lead to data loss if there is data in the column.
|
|
6
|
+
- The `deleted_by_id` column on the `users` table would be dropped and recreated. This will lead to data loss if there is data in the column.
|
|
7
|
+
- Changed the type of `status` 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.
|
|
8
|
+
|
|
9
|
+
*/
|
|
10
|
+
-- AlterTable
|
|
11
|
+
ALTER TABLE "users" DROP COLUMN "status",
|
|
12
|
+
ADD COLUMN "status" INTEGER NOT NULL,
|
|
13
|
+
DROP COLUMN "modified_by_id",
|
|
14
|
+
ADD COLUMN "modified_by_id" INTEGER,
|
|
15
|
+
DROP COLUMN "created_by_id",
|
|
16
|
+
ADD COLUMN "created_by_id" INTEGER,
|
|
17
|
+
DROP COLUMN "deleted_by_id",
|
|
18
|
+
ADD COLUMN "deleted_by_id" INTEGER;
|
package/prisma/schema.prisma
CHANGED
|
@@ -318,6 +318,7 @@ model RoleGroup {
|
|
|
318
318
|
groupId Int @unique @map("group_id")
|
|
319
319
|
name String @map("name")
|
|
320
320
|
description String? @map("description")
|
|
321
|
+
roleIds String[] @map("role_ids")
|
|
321
322
|
createdAt DateTime @default(now()) @map("created_at")
|
|
322
323
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
323
324
|
|
|
@@ -330,12 +331,13 @@ model RoleGroup {
|
|
|
330
331
|
|
|
331
332
|
// From prisma/users/role.prisma
|
|
332
333
|
model Role {
|
|
333
|
-
id
|
|
334
|
-
roleId
|
|
335
|
-
name
|
|
336
|
-
description
|
|
337
|
-
|
|
338
|
-
|
|
334
|
+
id String @id @default(uuid())
|
|
335
|
+
roleId Int @unique @map("role_id")
|
|
336
|
+
name String
|
|
337
|
+
description String?
|
|
338
|
+
permissionIds String[] @map("permission_ids")
|
|
339
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
340
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
339
341
|
|
|
340
342
|
// Relations
|
|
341
343
|
permissions Permission[]
|
|
@@ -351,14 +353,16 @@ model User {
|
|
|
351
353
|
email String @unique
|
|
352
354
|
fullName String @map("full_name")
|
|
353
355
|
organisationId String? @map("organisation_id")
|
|
354
|
-
status
|
|
356
|
+
status Int
|
|
357
|
+
externalData String? @map("external_data")
|
|
355
358
|
modifiedOn DateTime? @map("modified_on")
|
|
356
|
-
modifiedById
|
|
359
|
+
modifiedById Int? @map("modified_by_id")
|
|
357
360
|
createdOnInApprivo DateTime? @map("created_on_in_apprivo")
|
|
358
|
-
createdById
|
|
361
|
+
createdById Int? @map("created_by_id")
|
|
359
362
|
deletedOn DateTime? @map("deleted_on")
|
|
360
|
-
deletedById
|
|
363
|
+
deletedById Int? @map("deleted_by_id")
|
|
361
364
|
token String?
|
|
365
|
+
groupIds String[] @map("group_ids")
|
|
362
366
|
createdAt DateTime @default(now()) @map("created_at")
|
|
363
367
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
364
368
|
|
|
@@ -3,6 +3,7 @@ model RoleGroup {
|
|
|
3
3
|
groupId Int @unique @map("group_id")
|
|
4
4
|
name String @map("name")
|
|
5
5
|
description String? @map("description")
|
|
6
|
+
roleIds String[] @map("role_ids")
|
|
6
7
|
createdAt DateTime @default(now()) @map("created_at")
|
|
7
8
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
8
9
|
|
package/prisma/users/role.prisma
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
model Role {
|
|
2
|
-
id
|
|
3
|
-
roleId
|
|
4
|
-
name
|
|
5
|
-
description
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
id String @id @default(uuid())
|
|
3
|
+
roleId Int @unique @map("role_id")
|
|
4
|
+
name String
|
|
5
|
+
description String?
|
|
6
|
+
permissionIds String[] @map("permission_ids")
|
|
7
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
8
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
8
9
|
|
|
9
10
|
// Relations
|
|
10
11
|
permissions Permission[]
|
package/prisma/users/user.prisma
CHANGED
|
@@ -4,14 +4,16 @@ model User {
|
|
|
4
4
|
email String @unique
|
|
5
5
|
fullName String @map("full_name")
|
|
6
6
|
organisationId String? @map("organisation_id")
|
|
7
|
-
status
|
|
7
|
+
status Int
|
|
8
|
+
externalData String? @map("external_data")
|
|
8
9
|
modifiedOn DateTime? @map("modified_on")
|
|
9
|
-
modifiedById
|
|
10
|
+
modifiedById Int? @map("modified_by_id")
|
|
10
11
|
createdOnInApprivo DateTime? @map("created_on_in_apprivo")
|
|
11
|
-
createdById
|
|
12
|
+
createdById Int? @map("created_by_id")
|
|
12
13
|
deletedOn DateTime? @map("deleted_on")
|
|
13
|
-
deletedById
|
|
14
|
+
deletedById Int? @map("deleted_by_id")
|
|
14
15
|
token String?
|
|
16
|
+
groupIds String[] @map("group_ids")
|
|
15
17
|
createdAt DateTime @default(now()) @map("created_at")
|
|
16
18
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
17
19
|
|
|
@@ -25,4 +27,4 @@ model User {
|
|
|
25
27
|
underwriters Underwriter[] @relation("UserUnderwriters")
|
|
26
28
|
|
|
27
29
|
@@map("users")
|
|
28
|
-
}
|
|
30
|
+
}
|