@tomei/sso 0.45.1 → 0.45.3

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tomei/sso",
3
- "version": "0.45.1",
3
+ "version": "0.45.3",
4
4
  "description": "Tomei SSO Package",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -1947,6 +1947,7 @@ export class Group extends TreeNodeBase<Group> {
1947
1947
  include: [
1948
1948
  {
1949
1949
  model: UserModel,
1950
+ as: 'User',
1950
1951
  attributes: ['UserId', 'FullName'],
1951
1952
  },
1952
1953
  ],
@@ -72,13 +72,22 @@ export default class GroupReportingUserModel extends Model {
72
72
  @UpdatedAt
73
73
  UpdatedAt: Date;
74
74
 
75
- @BelongsTo(() => User, 'CreatedById')
75
+ @BelongsTo(() => User, {
76
+ as: 'CreatedByUser',
77
+ foreignKey: 'CreatedById',
78
+ })
76
79
  CreatedByUser: User;
77
80
 
78
- @BelongsTo(() => User, 'UpdatedById')
81
+ @BelongsTo(() => User, {
82
+ as: 'UpdatedByUser',
83
+ foreignKey: 'UpdatedById',
84
+ })
79
85
  UpdatedByUser: User;
80
86
 
81
- @BelongsTo(() => User, 'UserId')
87
+ @BelongsTo(() => User, {
88
+ as: 'User',
89
+ foreignKey: 'UserId',
90
+ })
82
91
  User: User;
83
92
 
84
93
  @BelongsTo(() => GroupModel, 'GroupCode')