@tomei/sso 0.37.4 → 0.38.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (95) hide show
  1. package/__tests__/unit/components/group-object-privilege/group-object-privilege.spec.ts +4 -4
  2. package/__tests__/unit/components/group-privilege/group-privilege.spec.ts +3 -3
  3. package/__tests__/unit/components/user-object-privilege/user-object-privilege.spec.ts +3 -3
  4. package/__tests__/unit/components/user-privilege/user-privilege.spec.ts +3 -3
  5. package/dist/__tests__/unit/components/group-object-privilege/group-object-privilege.spec.js +4 -4
  6. package/dist/__tests__/unit/components/group-object-privilege/group-object-privilege.spec.js.map +1 -1
  7. package/dist/__tests__/unit/components/group-privilege/group-privilege.spec.js +3 -3
  8. package/dist/__tests__/unit/components/group-privilege/group-privilege.spec.js.map +1 -1
  9. package/dist/__tests__/unit/components/user-object-privilege/user-object-privilege.spec.js +3 -3
  10. package/dist/__tests__/unit/components/user-object-privilege/user-object-privilege.spec.js.map +1 -1
  11. package/dist/__tests__/unit/components/user-privilege/user-privilege.spec.js +3 -3
  12. package/dist/__tests__/unit/components/user-privilege/user-privilege.spec.js.map +1 -1
  13. package/dist/src/components/group/group.d.ts +23 -12
  14. package/dist/src/components/group/group.js +188 -42
  15. package/dist/src/components/group/group.js.map +1 -1
  16. package/dist/src/components/group-object-privilege/group-object-privilege.d.ts +1 -1
  17. package/dist/src/components/group-object-privilege/group-object-privilege.js +7 -7
  18. package/dist/src/components/group-object-privilege/group-object-privilege.js.map +1 -1
  19. package/dist/src/components/group-privilege/group-privilege.d.ts +1 -1
  20. package/dist/src/components/group-privilege/group-privilege.js +2 -2
  21. package/dist/src/components/group-privilege/group-privilege.js.map +1 -1
  22. package/dist/src/components/group-privilege/group-privilege.repository.d.ts +1 -1
  23. package/dist/src/components/group-privilege/group-privilege.repository.js +11 -3
  24. package/dist/src/components/group-privilege/group-privilege.repository.js.map +1 -1
  25. package/dist/src/components/login-user/login-user.js.map +1 -1
  26. package/dist/src/components/login-user/user.js +2 -2
  27. package/dist/src/components/login-user/user.js.map +1 -1
  28. package/dist/src/components/system/system.js +1 -1
  29. package/dist/src/components/system/system.js.map +1 -1
  30. package/dist/src/components/system-privilege/system-privilege.d.ts +4 -3
  31. package/dist/src/components/system-privilege/system-privilege.js +18 -11
  32. package/dist/src/components/system-privilege/system-privilege.js.map +1 -1
  33. package/dist/src/components/user-group/user-group.js +1 -1
  34. package/dist/src/components/user-group/user-group.js.map +1 -1
  35. package/dist/src/components/user-object-privilege/user-object-privilege.d.ts +1 -1
  36. package/dist/src/components/user-object-privilege/user-object-privilege.js +1 -1
  37. package/dist/src/components/user-object-privilege/user-object-privilege.js.map +1 -1
  38. package/dist/src/components/user-privilege/user-privilege.d.ts +1 -1
  39. package/dist/src/components/user-privilege/user-privilege.js +1 -1
  40. package/dist/src/components/user-privilege/user-privilege.js.map +1 -1
  41. package/dist/src/interfaces/group-object-privilege.interface.d.ts +1 -1
  42. package/dist/src/interfaces/group-privilege.interface.d.ts +1 -1
  43. package/dist/src/interfaces/group.interface.d.ts +1 -0
  44. package/dist/src/interfaces/system-privilege.interface.d.ts +1 -0
  45. package/dist/src/interfaces/user-object-privilege.interface.d.ts +1 -1
  46. package/dist/src/interfaces/user-privilege.interface.d.ts +1 -1
  47. package/dist/src/models/group-object-privilege.entity.d.ts +1 -1
  48. package/dist/src/models/group-object-privilege.entity.js +1 -1
  49. package/dist/src/models/group-object-privilege.entity.js.map +1 -1
  50. package/dist/src/models/group-privilege.entity.d.ts +1 -1
  51. package/dist/src/models/group-privilege.entity.js +1 -1
  52. package/dist/src/models/group-privilege.entity.js.map +1 -1
  53. package/dist/src/models/group.entity.d.ts +1 -0
  54. package/dist/src/models/group.entity.js +7 -0
  55. package/dist/src/models/group.entity.js.map +1 -1
  56. package/dist/src/models/system-privilege.entity.d.ts +1 -0
  57. package/dist/src/models/system-privilege.entity.js +8 -0
  58. package/dist/src/models/system-privilege.entity.js.map +1 -1
  59. package/dist/src/models/user-object-privilege.entity.d.ts +1 -1
  60. package/dist/src/models/user-object-privilege.entity.js +1 -1
  61. package/dist/src/models/user-object-privilege.entity.js.map +1 -1
  62. package/dist/src/models/user-privilege.entity.d.ts +1 -1
  63. package/dist/src/models/user-privilege.entity.js +1 -1
  64. package/dist/src/models/user-privilege.entity.js.map +1 -1
  65. package/dist/tsconfig.tsbuildinfo +1 -1
  66. package/migrations/20240527064926-create-system-privilege-table.js +66 -62
  67. package/migrations/20240527065342-create-group-table.js +4 -0
  68. package/migrations/20240528032229-user-privilege-table.js +2 -2
  69. package/migrations/20240528063003-create-group-privilege-table.js +12 -2
  70. package/migrations/20240528063051-create-group-object-privilege-table.js +2 -2
  71. package/migrations/20240528063107-create-user-object-privilege-table.js +2 -2
  72. package/package.json +8 -8
  73. package/src/components/group/group.ts +225 -60
  74. package/src/components/group-object-privilege/group-object-privilege.ts +9 -9
  75. package/src/components/group-privilege/group-privilege.repository.ts +16 -3
  76. package/src/components/group-privilege/group-privilege.ts +3 -3
  77. package/src/components/login-user/login-user.ts +0 -58
  78. package/src/components/login-user/user.ts +2 -4
  79. package/src/components/system/system.ts +1 -1
  80. package/src/components/system-privilege/system-privilege.ts +20 -12
  81. package/src/components/user-group/user-group.ts +1 -1
  82. package/src/components/user-object-privilege/user-object-privilege.ts +2 -2
  83. package/src/components/user-privilege/user-privilege.ts +2 -2
  84. package/src/interfaces/group-object-privilege.interface.ts +1 -1
  85. package/src/interfaces/group-privilege.interface.ts +1 -1
  86. package/src/interfaces/group.interface.ts +1 -0
  87. package/src/interfaces/system-privilege.interface.ts +1 -0
  88. package/src/interfaces/user-object-privilege.interface.ts +1 -1
  89. package/src/interfaces/user-privilege.interface.ts +1 -1
  90. package/src/models/group-object-privilege.entity.ts +1 -1
  91. package/src/models/group-privilege.entity.ts +1 -1
  92. package/src/models/group.entity.ts +6 -0
  93. package/src/models/system-privilege.entity.ts +7 -0
  94. package/src/models/user-object-privilege.entity.ts +1 -1
  95. package/src/models/user-privilege.entity.ts +1 -1
@@ -104,64 +104,6 @@ export class LoginUser extends User implements ILoginUser {
104
104
  }
105
105
  }
106
106
 
107
- // private async checkSystemAccess(
108
- // userId: number,
109
- // systemCode: string,
110
- // dbTransaction?: any,
111
- // ): Promise<void> {
112
- // try {
113
- // let isUserHaveAccess = false;
114
-
115
- // const systemAccess = await User._UserSystemAccessRepo.findOne({
116
- // where: {
117
- // UserId: userId,
118
- // SystemCode: systemCode,
119
- // Status: 'Active',
120
- // },
121
- // dbTransaction,
122
- // });
123
-
124
- // if (systemAccess) {
125
- // isUserHaveAccess = true;
126
- // } else {
127
- // const userGroups = await User._UserGroupRepo.findAll({
128
- // where: {
129
- // UserId: userId,
130
- // InheritGroupAccessYN: 'Y',
131
- // Status: 'Active',
132
- // },
133
- // include: [
134
- // {
135
- // model: GroupModel,
136
- // },
137
- // ],
138
- // dbTransaction,
139
- // });
140
-
141
- // for (const usergroup of userGroups) {
142
- // const group = usergroup.Group;
143
- // const groupSystemAccess = await User.getInheritedSystemAccess(
144
- // dbTransaction,
145
- // group,
146
- // );
147
-
148
- // for (const system of groupSystemAccess) {
149
- // if (system.SystemCode === systemCode) {
150
- // isUserHaveAccess = true;
151
- // break;
152
- // }
153
- // }
154
- // }
155
- // }
156
-
157
- // if (!isUserHaveAccess) {
158
- // throw new Error("User don't have access to the system.");
159
- // }
160
- // } catch (error) {
161
- // throw error;
162
- // }
163
- // }
164
-
165
107
  async checkSession(
166
108
  systemCode: string,
167
109
  sessionId: string,
@@ -6,8 +6,6 @@ import { SystemRepository } from '../system/system.repository';
6
6
  import { LoginHistoryRepository } from '../login-history/login-history.repository';
7
7
  import { PasswordHashService } from '../password-hash/password-hash.service';
8
8
  import { UserGroupRepository } from '../user-group/user-group.repository';
9
- import { SMTPMailer } from '@tomei/mailer';
10
- import { ISystemLogin } from '../../../src/interfaces/system-login.interface';
11
9
  import Staff from '../../models/staff.entity';
12
10
  import SystemPrivilege from '../../models/system-privilege.entity';
13
11
  import LoginHistory from '../../models/login-history.entity';
@@ -1380,7 +1378,7 @@ export class User extends UserBase {
1380
1378
  //Part 5: Record Create User Activity
1381
1379
  const activity = new Activity();
1382
1380
  activity.ActivityId = activity.createId();
1383
- activity.Action = ActionEnum.ADD;
1381
+ activity.Action = ActionEnum.CREATE;
1384
1382
  activity.Description = 'Create User';
1385
1383
  activity.EntityType = 'LoginUser';
1386
1384
  activity.EntityId = newUser.UserId.toString();
@@ -1938,7 +1936,7 @@ export class User extends UserBase {
1938
1936
  //4. Record Create UserGroup Activity
1939
1937
  const activity = new Activity();
1940
1938
  activity.ActivityId = activity.createId();
1941
- activity.Action = ActionEnum.ADD;
1939
+ activity.Action = ActionEnum.CREATE;
1942
1940
  activity.Description = 'Add User Group';
1943
1941
  activity.EntityType = 'UserGroup';
1944
1942
  activity.EntityId = group.GroupCode;
@@ -179,7 +179,7 @@ export class System extends ObjectBase {
179
179
  //Instantiate new activity from Activity class, call createId() method, then set the properties.
180
180
  const activity = new Activity();
181
181
  activity.ActivityId = activity.createId();
182
- activity.Action = ActionEnum.ADD;
182
+ activity.Action = ActionEnum.CREATE;
183
183
  activity.Description = 'Add System';
184
184
  activity.EntityType = 'System';
185
185
  activity.EntityId = this.SystemCode;
@@ -13,6 +13,7 @@ export class SystemPrivilege extends ObjectBase {
13
13
  ObjectType = 'SystemPrivilege';
14
14
  TableName = 'sso_SystemPrivilege';
15
15
  ObjectId: string;
16
+ PrivilegeCode: string;
16
17
  SystemCode: string;
17
18
  ObjectName: string;
18
19
  Description: string;
@@ -22,11 +23,11 @@ export class SystemPrivilege extends ObjectBase {
22
23
  private _CreatedById: number;
23
24
  private _UpdatedById: number;
24
25
 
25
- get PrivilegeCode() {
26
+ get SystemPrivilegeId() {
26
27
  return this.ObjectId;
27
28
  }
28
29
 
29
- set PrivilegeCode(value: string) {
30
+ set SystemPrivilegeId(value: string) {
30
31
  this.ObjectId = value;
31
32
  }
32
33
 
@@ -52,7 +53,8 @@ export class SystemPrivilege extends ObjectBase {
52
53
  private constructor(systemPrivilegeAttr?: ISystemPrivilegeAttr) {
53
54
  super();
54
55
  if (systemPrivilegeAttr) {
55
- this.ObjectId = systemPrivilegeAttr.PrivilegeCode;
56
+ this.SystemPrivilegeId = systemPrivilegeAttr.SystemPrivilegeId;
57
+ this.PrivilegeCode = systemPrivilegeAttr.PrivilegeCode;
56
58
  this.SystemCode = systemPrivilegeAttr.SystemCode;
57
59
  this.Description = systemPrivilegeAttr.Description;
58
60
  this.Status = systemPrivilegeAttr.Status;
@@ -64,7 +66,8 @@ export class SystemPrivilege extends ObjectBase {
64
66
  }
65
67
 
66
68
  setAttributes(systemPrivilegeAttr: ISystemPrivilegeAttr) {
67
- this.ObjectId = systemPrivilegeAttr.PrivilegeCode;
69
+ this.PrivilegeCode = systemPrivilegeAttr.PrivilegeCode;
70
+ this.SystemPrivilegeId = systemPrivilegeAttr.SystemPrivilegeId;
68
71
  this.SystemCode = systemPrivilegeAttr.SystemCode;
69
72
  this.Description = systemPrivilegeAttr.Description;
70
73
  this.Status = systemPrivilegeAttr.Status;
@@ -74,18 +77,19 @@ export class SystemPrivilege extends ObjectBase {
74
77
  this._UpdatedById = systemPrivilegeAttr.UpdatedById;
75
78
  }
76
79
 
77
- static async init(dbTransaction: any, PrivilegeCode?: string) {
80
+ static async init(dbTransaction: any, SystemPrivilegeId?: string) {
78
81
  try {
79
82
  const systemPrivilege = new SystemPrivilege();
80
- if (PrivilegeCode) {
83
+ if (SystemPrivilegeId) {
81
84
  const systemPrivilegeAttr = await this._Repository.findByPk(
82
- PrivilegeCode,
85
+ SystemPrivilegeId,
83
86
  {
84
87
  transaction: dbTransaction,
85
88
  },
86
89
  );
87
90
  if (systemPrivilegeAttr) {
88
- systemPrivilege.ObjectId = systemPrivilegeAttr.PrivilegeCode;
91
+ systemPrivilege.PrivilegeCode = systemPrivilegeAttr.PrivilegeCode;
92
+ systemPrivilege.ObjectId = systemPrivilegeAttr.SystemPrivilegeId;
89
93
  systemPrivilege.SystemCode = systemPrivilegeAttr.SystemCode;
90
94
  systemPrivilege.Description = systemPrivilegeAttr.Description;
91
95
  systemPrivilege.Status = systemPrivilegeAttr.Status;
@@ -114,7 +118,7 @@ export class SystemPrivilege extends ObjectBase {
114
118
  ) {
115
119
  try {
116
120
  //Part 1: Privilege Checking
117
- const systemCode =
121
+ const systemCode: string =
118
122
  ApplicationConfig.getComponentConfigValue('system-code');
119
123
  const isPrivileged = await loginUser.checkPrivileges(
120
124
  systemCode,
@@ -169,7 +173,8 @@ export class SystemPrivilege extends ObjectBase {
169
173
  //Part 3: Create Privilege
170
174
  //Initialise new SystemPrivilege instance and populate below
171
175
  const newSystemPrivilege = new SystemPrivilege();
172
- newSystemPrivilege.ObjectId = systemPrivilege.PrivilegeCode;
176
+ newSystemPrivilege.ObjectId = newSystemPrivilege.createId();
177
+ newSystemPrivilege.PrivilegeCode = systemPrivilege.PrivilegeCode;
173
178
  newSystemPrivilege.SystemCode = systemPrivilege.SystemCode;
174
179
  newSystemPrivilege.Description = systemPrivilege.Description;
175
180
  newSystemPrivilege.Status = 'Active';
@@ -181,7 +186,8 @@ export class SystemPrivilege extends ObjectBase {
181
186
  //Call SystemPrivilege._Repo create method
182
187
  await this._Repository.create(
183
188
  {
184
- PrivilegeCode: newSystemPrivilege.ObjectId,
189
+ SystemPrivilegeId: newSystemPrivilege.ObjectId,
190
+ PrivilegeCode: newSystemPrivilege.PrivilegeCode,
185
191
  SystemCode: newSystemPrivilege.SystemCode,
186
192
  Description: newSystemPrivilege.Description,
187
193
  Status: newSystemPrivilege.Status,
@@ -202,7 +208,7 @@ export class SystemPrivilege extends ObjectBase {
202
208
  //Instantiate new activity object and populate
203
209
  const activity = new Activity();
204
210
  activity.ActivityId = activity.createId();
205
- activity.Action = ActionEnum.ADD;
211
+ activity.Action = ActionEnum.CREATE;
206
212
  activity.Description = 'Add System Privilege';
207
213
  activity.EntityType = 'SystemPrivilege';
208
214
  activity.EntityId = newSystemPrivilege.SystemCode;
@@ -345,9 +351,11 @@ export class SystemPrivilege extends ObjectBase {
345
351
  );
346
352
 
347
353
  //Call SystemPrivilege._Repo create method for each newPrivileges.
354
+ const np = new SystemPrivilege();
348
355
  for (const privilegeConfig of tobeCreatePrivileges) {
349
356
  await this._Repository.create(
350
357
  {
358
+ SystemPrivilegeId: np.createId(),
351
359
  PrivilegeCode: privilegeConfig.privilegeCode,
352
360
  SystemCode: systemCode,
353
361
  Description: privilegeConfig.description,
@@ -227,7 +227,7 @@ export class UserGroup extends ObjectBase {
227
227
  // EntityValueAfter: EntityValueAfter
228
228
  const activity = new Activity();
229
229
  activity.ActivityId = activity.createId();
230
- activity.Action = ActionEnum.ADD;
230
+ activity.Action = ActionEnum.CREATE;
231
231
  activity.Description = 'Assign user to group.';
232
232
  activity.EntityType = 'UserGroup';
233
233
  activity.EntityId = this.UserGroupId.toString();
@@ -8,7 +8,7 @@ export class UserObjectPrivilege extends ObjectBase {
8
8
  ObjectName: string;
9
9
  ObjectPrivilegeId: number;
10
10
  UserId: number;
11
- PrivilegeCode: string;
11
+ SystemPrivilegeId: string;
12
12
  ObjectId: string;
13
13
  ObjectType: string;
14
14
  Status: ObjectStatus;
@@ -40,7 +40,7 @@ export class UserObjectPrivilege extends ObjectBase {
40
40
  if (userObjectPrivilegeAttr) {
41
41
  this.ObjectPrivilegeId = userObjectPrivilegeAttr.ObjectPrivilegeId;
42
42
  this.UserId = userObjectPrivilegeAttr.UserId;
43
- this.PrivilegeCode = userObjectPrivilegeAttr.PrivilegeCode;
43
+ this.SystemPrivilegeId = userObjectPrivilegeAttr.SystemPrivilegeId;
44
44
  this.ObjectId = userObjectPrivilegeAttr.ObjectId;
45
45
  this.ObjectType = userObjectPrivilegeAttr.ObjectType;
46
46
  this.Status = userObjectPrivilegeAttr.Status;
@@ -9,7 +9,7 @@ export class UserPrivilege extends ObjectBase {
9
9
  ObjectId: string;
10
10
  UserPrivilegeId: number;
11
11
  UserId: number;
12
- PrivilegeCode: string;
12
+ SystemPrivilegeId: string;
13
13
  Status: string;
14
14
  private _CreatedById: number;
15
15
  private _UpdatedById: number;
@@ -39,7 +39,7 @@ export class UserPrivilege extends ObjectBase {
39
39
  if (userPrivilegeAttr) {
40
40
  this.UserPrivilegeId = userPrivilegeAttr.UserPrivilegeId;
41
41
  this.UserId = userPrivilegeAttr.UserId;
42
- this.PrivilegeCode = userPrivilegeAttr.PrivilegeCode;
42
+ this.SystemPrivilegeId = userPrivilegeAttr.SystemPrivilegeId;
43
43
  this.Status = userPrivilegeAttr.Status;
44
44
  this._CreatedById = userPrivilegeAttr.CreatedById;
45
45
  this._UpdatedById = userPrivilegeAttr.UpdatedById;
@@ -3,7 +3,7 @@ import { ObjectStatus } from '../enum/object-status.enum';
3
3
  export interface IGroupObjectPrivilegeAttr {
4
4
  GroupObjectPrivilegeId?: number;
5
5
  GroupCode: string;
6
- PrivilegeCode: string;
6
+ SystemPrivilegeId: string;
7
7
  ObjectId: string;
8
8
  ObjectType: string;
9
9
  Status: ObjectStatus;
@@ -1,7 +1,7 @@
1
1
  export interface IGroupPrivilegeAttr {
2
2
  GroupPrivilegeId?: number;
3
3
  GroupCode: string;
4
- PrivilegeCode: string;
4
+ SystemPrivilegeId: string;
5
5
  Status: string;
6
6
  CreatedById: number;
7
7
  UpdatedById: number;
@@ -8,6 +8,7 @@ export interface IGroupAttr {
8
8
  ParentGroupCode: string;
9
9
  InheritParentPrivilegeYN: string;
10
10
  InheritParentSystemAccessYN: string;
11
+ Path: string;
11
12
  Status: string;
12
13
  CreatedById: number;
13
14
  UpdatedById: number;
@@ -1,4 +1,5 @@
1
1
  export interface ISystemPrivilegeAttr {
2
+ SystemPrivilegeId: string;
2
3
  PrivilegeCode: string;
3
4
  SystemCode: string;
4
5
  Description: string;
@@ -3,7 +3,7 @@ import { ObjectStatus } from '../enum/object-status.enum';
3
3
  export interface IUserObjectPrivilegeAttr {
4
4
  ObjectPrivilegeId: number;
5
5
  UserId: number;
6
- PrivilegeCode: string;
6
+ SystemPrivilegeId: string;
7
7
  ObjectId: string;
8
8
  ObjectType: string;
9
9
  Status: ObjectStatus;
@@ -1,7 +1,7 @@
1
1
  export interface IUserPrivilegeAttr {
2
2
  UserPrivilegeId: number;
3
3
  UserId: number;
4
- PrivilegeCode: string;
4
+ SystemPrivilegeId: string;
5
5
  Status: string;
6
6
  CreatedById: number;
7
7
  UpdatedById: number;
@@ -39,7 +39,7 @@ export default class GroupObjectPrivilegeModel extends Model {
39
39
  type: DataType.STRING(10),
40
40
  allowNull: false,
41
41
  })
42
- PrivilegeCode: string;
42
+ SystemPrivilegeId: string;
43
43
 
44
44
  @Column({
45
45
  type: DataType.STRING,
@@ -38,7 +38,7 @@ export default class GroupPrivilegeModel extends Model {
38
38
  type: DataType.STRING(10),
39
39
  allowNull: false,
40
40
  })
41
- PrivilegeCode: string;
41
+ SystemPrivilegeId: string;
42
42
 
43
43
  @Column({
44
44
  type: DataType.CHAR(20),
@@ -71,6 +71,12 @@ export default class GroupModel extends Model {
71
71
  })
72
72
  Status: string;
73
73
 
74
+ @Column({
75
+ allowNull: false,
76
+ type: DataType.STRING(10),
77
+ })
78
+ Path: string;
79
+
74
80
  @ForeignKey(() => User)
75
81
  @Column({
76
82
  allowNull: false,
@@ -22,6 +22,13 @@ import UserPrivilegeModel from './user-privilege.entity';
22
22
  export default class SystemPrivilegeModel extends Model {
23
23
  @Column({
24
24
  primaryKey: true,
25
+ allowNull: false,
26
+ type: DataType.STRING(30),
27
+ field: 'SystemPrivilegeId',
28
+ })
29
+ SystemPrivilegeId: string;
30
+
31
+ @Column({
25
32
  allowNull: false,
26
33
  type: DataType.STRING(50),
27
34
  field: 'PrivilegeCode',
@@ -38,7 +38,7 @@ export default class UserObjectPrivilegeModel extends Model {
38
38
  type: DataType.STRING(10),
39
39
  allowNull: false,
40
40
  })
41
- PrivilegeCode: string;
41
+ SystemPrivilegeId: string;
42
42
 
43
43
  @Column({
44
44
  type: DataType.STRING,
@@ -39,7 +39,7 @@ export default class UserPrivilegeModel extends Model {
39
39
  type: DataType.STRING(10),
40
40
  allowNull: false,
41
41
  })
42
- PrivilegeCode: string;
42
+ SystemPrivilegeId: string;
43
43
 
44
44
  @Column({
45
45
  type: DataType.CHAR(20),