@dynamatix/gb-schemas 2.0.42 → 2.0.44
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/user.entity.d.ts +1 -12
- package/dist/entities/users/user.entity.d.ts.map +1 -1
- package/dist/entities/users/user.entity.js +0 -5
- package/entities/users/user.entity.ts +1 -17
- package/package.json +1 -1
- package/prisma/migrations/20250514064054_update_user_schema/migration.sql +12 -0
- package/prisma/migrations/20250514071524_update_user_schema/migration.sql +15 -0
- package/prisma/schema.prisma +23 -39
- package/prisma/users/role-group.prisma +4 -4
- package/prisma/users/user.prisma +20 -36
|
@@ -1,20 +1,10 @@
|
|
|
1
1
|
import { RoleGroupEntity } from './role-group.entity';
|
|
2
2
|
import { SystemParameterEntity } from '../shared/system-parameter.entity';
|
|
3
|
-
export declare class ClaimEntity {
|
|
4
|
-
id: string;
|
|
5
|
-
key: string;
|
|
6
|
-
value: string;
|
|
7
|
-
userId: string;
|
|
8
|
-
createdAt: Date;
|
|
9
|
-
updatedAt: Date;
|
|
10
|
-
constructor(partial: Partial<ClaimEntity>);
|
|
11
|
-
}
|
|
12
3
|
export declare class UserEntity {
|
|
13
4
|
id: string;
|
|
14
|
-
accountId:
|
|
5
|
+
accountId: number;
|
|
15
6
|
email: string;
|
|
16
7
|
fullName: string;
|
|
17
|
-
password: string;
|
|
18
8
|
organisationId?: string;
|
|
19
9
|
status: string;
|
|
20
10
|
modifiedOn?: Date;
|
|
@@ -27,7 +17,6 @@ export declare class UserEntity {
|
|
|
27
17
|
createdAt: Date;
|
|
28
18
|
updatedAt: Date;
|
|
29
19
|
groups?: RoleGroupEntity[];
|
|
30
|
-
claims?: ClaimEntity[];
|
|
31
20
|
createdSystemParameters?: SystemParameterEntity[];
|
|
32
21
|
updatedSystemParameters?: SystemParameterEntity[];
|
|
33
22
|
constructor(partial: Partial<UserEntity>);
|
|
@@ -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;
|
|
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,CAAC;IACtB,kBAAkB,CAAC,EAAE,IAAI,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,EAAG,IAAI,CAAC;IACjB,SAAS,EAAG,IAAI,CAAC;IAGjB,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"}
|
|
@@ -1,25 +1,10 @@
|
|
|
1
1
|
import { RoleGroupEntity } from './role-group.entity';
|
|
2
2
|
import { SystemParameterEntity } from '../shared/system-parameter.entity';
|
|
3
|
-
|
|
4
|
-
export class ClaimEntity {
|
|
5
|
-
id!: string;
|
|
6
|
-
key!: string;
|
|
7
|
-
value!: string;
|
|
8
|
-
userId!: string;
|
|
9
|
-
createdAt!: Date;
|
|
10
|
-
updatedAt!: Date;
|
|
11
|
-
|
|
12
|
-
constructor(partial: Partial<ClaimEntity>) {
|
|
13
|
-
Object.assign(this, partial);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
3
|
export class UserEntity {
|
|
18
4
|
id!: string;
|
|
19
|
-
accountId!:
|
|
5
|
+
accountId!: number;
|
|
20
6
|
email!: string;
|
|
21
7
|
fullName!: string;
|
|
22
|
-
password!: string;
|
|
23
8
|
organisationId?: string;
|
|
24
9
|
status!: string;
|
|
25
10
|
modifiedOn?: Date;
|
|
@@ -34,7 +19,6 @@ export class UserEntity {
|
|
|
34
19
|
|
|
35
20
|
// Relations
|
|
36
21
|
groups?: RoleGroupEntity[];
|
|
37
|
-
claims?: ClaimEntity[];
|
|
38
22
|
createdSystemParameters?: SystemParameterEntity[];
|
|
39
23
|
updatedSystemParameters?: SystemParameterEntity[];
|
|
40
24
|
|
package/package.json
CHANGED
|
@@ -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");
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Warnings:
|
|
3
|
+
|
|
4
|
+
- You are about to drop the column `password` on the `users` table. All the data in the column will be lost.
|
|
5
|
+
- You are about to drop the `claims` table. If the table is not empty, all the data it contains will be lost.
|
|
6
|
+
|
|
7
|
+
*/
|
|
8
|
+
-- DropForeignKey
|
|
9
|
+
ALTER TABLE "claims" DROP CONSTRAINT "claims_user_id_fkey";
|
|
10
|
+
|
|
11
|
+
-- AlterTable
|
|
12
|
+
ALTER TABLE "users" DROP COLUMN "password";
|
|
13
|
+
|
|
14
|
+
-- DropTable
|
|
15
|
+
DROP TABLE "claims";
|
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 Int
|
|
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,48 +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
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
updatedAt DateTime @updatedAt @map("updated_at")
|
|
349
|
+
id String @id @default(uuid())
|
|
350
|
+
accountId Int @unique @map("account_id")
|
|
351
|
+
email String @unique
|
|
352
|
+
fullName String @map("full_name")
|
|
353
|
+
organisationId String? @map("organisation_id")
|
|
354
|
+
status String
|
|
355
|
+
modifiedOn DateTime? @map("modified_on")
|
|
356
|
+
modifiedById String? @map("modified_by_id")
|
|
357
|
+
createdOnInApprivo DateTime? @map("created_on_in_apprivo")
|
|
358
|
+
createdById String? @map("created_by_id")
|
|
359
|
+
deletedOn DateTime? @map("deleted_on")
|
|
360
|
+
deletedById String? @map("deleted_by_id")
|
|
361
|
+
token String?
|
|
362
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
363
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
365
364
|
|
|
366
365
|
// Relations
|
|
367
|
-
groups
|
|
368
|
-
claims Claim[]
|
|
366
|
+
groups RoleGroup[] @relation("UserToRoleGroup")
|
|
369
367
|
createdSystemParameters SystemParameter[] @relation("CreatedByUser")
|
|
370
368
|
updatedSystemParameters SystemParameter[] @relation("UpdatedByUser")
|
|
371
|
-
createdNotes
|
|
372
|
-
assignedNotes
|
|
373
|
-
alerts
|
|
374
|
-
underwriters
|
|
369
|
+
createdNotes ApplicationNote[] @relation("CreatedByUser")
|
|
370
|
+
assignedNotes ApplicationNote[] @relation("AssignedByUser")
|
|
371
|
+
alerts Alert[] @relation("UserAlerts")
|
|
372
|
+
underwriters Underwriter[] @relation("UserUnderwriters")
|
|
375
373
|
|
|
376
374
|
@@map("users")
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
model Claim {
|
|
380
|
-
id String @id @default(uuid())
|
|
381
|
-
key String
|
|
382
|
-
value String
|
|
383
|
-
userId String @map("user_id")
|
|
384
|
-
createdAt DateTime @default(now()) @map("created_at")
|
|
385
|
-
updatedAt DateTime @updatedAt @map("updated_at")
|
|
386
|
-
|
|
387
|
-
// Relations
|
|
388
|
-
user User @relation(fields: [userId], references: [id])
|
|
389
|
-
|
|
390
|
-
@@map("claims")
|
|
391
375
|
}
|
|
392
376
|
|
|
393
377
|
// From prisma/product-catalogues/product-catalogue.prisma
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
model RoleGroup {
|
|
2
2
|
id String @id @default(uuid())
|
|
3
|
-
groupId Int
|
|
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,44 +1,28 @@
|
|
|
1
1
|
model User {
|
|
2
|
-
id
|
|
3
|
-
accountId
|
|
4
|
-
email
|
|
5
|
-
fullName
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
updatedAt DateTime @updatedAt @map("updated_at")
|
|
2
|
+
id String @id @default(uuid())
|
|
3
|
+
accountId Int @unique @map("account_id")
|
|
4
|
+
email String @unique
|
|
5
|
+
fullName String @map("full_name")
|
|
6
|
+
organisationId String? @map("organisation_id")
|
|
7
|
+
status String
|
|
8
|
+
modifiedOn DateTime? @map("modified_on")
|
|
9
|
+
modifiedById String? @map("modified_by_id")
|
|
10
|
+
createdOnInApprivo DateTime? @map("created_on_in_apprivo")
|
|
11
|
+
createdById String? @map("created_by_id")
|
|
12
|
+
deletedOn DateTime? @map("deleted_on")
|
|
13
|
+
deletedById String? @map("deleted_by_id")
|
|
14
|
+
token String?
|
|
15
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
16
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
18
17
|
|
|
19
18
|
// Relations
|
|
20
|
-
groups
|
|
21
|
-
claims Claim[]
|
|
19
|
+
groups RoleGroup[] @relation("UserToRoleGroup")
|
|
22
20
|
createdSystemParameters SystemParameter[] @relation("CreatedByUser")
|
|
23
21
|
updatedSystemParameters SystemParameter[] @relation("UpdatedByUser")
|
|
24
|
-
createdNotes
|
|
25
|
-
assignedNotes
|
|
26
|
-
alerts
|
|
27
|
-
underwriters
|
|
22
|
+
createdNotes ApplicationNote[] @relation("CreatedByUser")
|
|
23
|
+
assignedNotes ApplicationNote[] @relation("AssignedByUser")
|
|
24
|
+
alerts Alert[] @relation("UserAlerts")
|
|
25
|
+
underwriters Underwriter[] @relation("UserUnderwriters")
|
|
28
26
|
|
|
29
27
|
@@map("users")
|
|
30
28
|
}
|
|
31
|
-
|
|
32
|
-
model Claim {
|
|
33
|
-
id String @id @default(uuid())
|
|
34
|
-
key String
|
|
35
|
-
value String
|
|
36
|
-
userId String @map("user_id")
|
|
37
|
-
createdAt DateTime @default(now()) @map("created_at")
|
|
38
|
-
updatedAt DateTime @updatedAt @map("updated_at")
|
|
39
|
-
|
|
40
|
-
// Relations
|
|
41
|
-
user User @relation(fields: [userId], references: [id])
|
|
42
|
-
|
|
43
|
-
@@map("claims")
|
|
44
|
-
}
|