@tomei/sso 0.34.6 → 0.34.7
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/src/components/login-user/interfaces/user-info.interface.d.ts +1 -0
- package/dist/src/components/login-user/login-user.js +4 -4
- package/dist/src/components/login-user/login-user.js.map +1 -1
- package/dist/src/components/login-user/user.js +13 -12
- package/dist/src/components/login-user/user.js.map +1 -1
- package/dist/src/models/user.entity.d.ts +5 -1
- package/dist/src/models/user.entity.js +31 -3
- package/dist/src/models/user.entity.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/migrations/20240314080602-create-user-table.js +25 -9
- package/package.json +1 -1
- package/src/components/login-user/interfaces/user-info.interface.ts +1 -0
- package/src/components/login-user/login-user.ts +4 -3
- package/src/components/login-user/user.ts +13 -9
- package/src/models/user.entity.ts +27 -3
@@ -10,6 +10,10 @@ module.exports = {
|
|
10
10
|
allowNull: false,
|
11
11
|
autoIncrement: true,
|
12
12
|
},
|
13
|
+
UserName: {
|
14
|
+
type: Sequelize.STRING(50),
|
15
|
+
allowNull: true,
|
16
|
+
},
|
13
17
|
Email: {
|
14
18
|
type: Sequelize.STRING,
|
15
19
|
allowNull: false,
|
@@ -19,6 +23,22 @@ module.exports = {
|
|
19
23
|
type: Sequelize.STRING,
|
20
24
|
allowNull: false,
|
21
25
|
},
|
26
|
+
FullName: {
|
27
|
+
type: Sequelize.STRING(200),
|
28
|
+
allowNull: false,
|
29
|
+
},
|
30
|
+
IdNo: {
|
31
|
+
type: Sequelize.STRING(50),
|
32
|
+
allowNull: true,
|
33
|
+
},
|
34
|
+
IdType: {
|
35
|
+
type: Sequelize.STRING(20),
|
36
|
+
allowNull: true,
|
37
|
+
},
|
38
|
+
ContactNo: {
|
39
|
+
type: Sequelize.STRING(20),
|
40
|
+
allowNull: true,
|
41
|
+
},
|
22
42
|
Status: {
|
23
43
|
type: Sequelize.STRING,
|
24
44
|
allowNull: false,
|
@@ -27,10 +47,6 @@ module.exports = {
|
|
27
47
|
type: Sequelize.CHAR(1),
|
28
48
|
allowNull: true,
|
29
49
|
},
|
30
|
-
UserName: {
|
31
|
-
type: Sequelize.STRING(50),
|
32
|
-
allowNull: true,
|
33
|
-
},
|
34
50
|
FirstLoginAt: {
|
35
51
|
type: Sequelize.DATE,
|
36
52
|
allowNull: true,
|
@@ -84,7 +100,9 @@ module.exports = {
|
|
84
100
|
},
|
85
101
|
UpdatedAt: {
|
86
102
|
allowNull: false,
|
87
|
-
defaultValue: Sequelize.literal(
|
103
|
+
defaultValue: Sequelize.literal(
|
104
|
+
'CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)',
|
105
|
+
),
|
88
106
|
type: Sequelize.DATE,
|
89
107
|
},
|
90
108
|
UpdatedById: {
|
@@ -97,12 +115,10 @@ module.exports = {
|
|
97
115
|
onDelete: 'CASCADE',
|
98
116
|
onUpdate: 'CASCADE',
|
99
117
|
},
|
100
|
-
|
101
118
|
});
|
102
119
|
},
|
103
120
|
|
104
121
|
async down(queryInterface, Sequelize) {
|
105
|
-
|
106
|
-
|
107
|
-
}
|
122
|
+
await queryInterface.dropTable('sso_User');
|
123
|
+
},
|
108
124
|
};
|
package/package.json
CHANGED
@@ -43,9 +43,10 @@ export class LoginUser extends User implements ILoginUser {
|
|
43
43
|
const userAttr: IUserAttr = {
|
44
44
|
UserId: user.UserId,
|
45
45
|
UserName: user.UserName,
|
46
|
-
FullName: user?.
|
47
|
-
IDNo: user?.
|
48
|
-
|
46
|
+
FullName: user?.FullName || null,
|
47
|
+
IDNo: user?.IdNo || null,
|
48
|
+
IDType: user?.IdType || null,
|
49
|
+
ContactNo: user?.ContactNo || null,
|
49
50
|
Email: user.Email,
|
50
51
|
Password: user.Password,
|
51
52
|
Status: user.Status,
|
@@ -313,9 +313,10 @@ export class User extends UserBase {
|
|
313
313
|
const userAttr: IUserAttr = {
|
314
314
|
UserId: user.UserId,
|
315
315
|
UserName: user.UserName,
|
316
|
-
FullName: user?.
|
317
|
-
IDNo: user?.
|
318
|
-
|
316
|
+
FullName: user?.FullName || null,
|
317
|
+
IDNo: user?.IdNo || null,
|
318
|
+
IDType: user?.IdType || null,
|
319
|
+
ContactNo: user?.ContactNo || null,
|
319
320
|
Email: user.Email,
|
320
321
|
Password: user.Password,
|
321
322
|
Status: user.Status,
|
@@ -405,9 +406,10 @@ export class User extends UserBase {
|
|
405
406
|
const userAttr: IUserAttr = {
|
406
407
|
UserId: user.UserId,
|
407
408
|
UserName: user.UserName,
|
408
|
-
FullName: user?.
|
409
|
-
IDNo: user?.
|
410
|
-
|
409
|
+
FullName: user?.FullName || null,
|
410
|
+
IDNo: user?.IdNo || null,
|
411
|
+
IDType: user?.IdType || null,
|
412
|
+
ContactNo: user?.ContactNo || null,
|
411
413
|
Email: user.Email,
|
412
414
|
Password: user.Password,
|
413
415
|
Status: user.Status,
|
@@ -1316,6 +1318,7 @@ export class User extends UserBase {
|
|
1316
1318
|
UserName: user.UserName,
|
1317
1319
|
FullName: user.FullName,
|
1318
1320
|
IDNo: user.IDNo,
|
1321
|
+
IDType: user.IDType,
|
1319
1322
|
Email: user.Email,
|
1320
1323
|
ContactNo: user.ContactNo,
|
1321
1324
|
Password: user.Password,
|
@@ -2316,9 +2319,10 @@ export class User extends UserBase {
|
|
2316
2319
|
const userAttr: IUserAttr = {
|
2317
2320
|
UserId: user.UserId,
|
2318
2321
|
UserName: user.UserName,
|
2319
|
-
FullName: user?.
|
2320
|
-
IDNo: user?.
|
2321
|
-
|
2322
|
+
FullName: user?.FullName || null,
|
2323
|
+
IDNo: user?.IdNo || null,
|
2324
|
+
IDType: user?.IdType || null,
|
2325
|
+
ContactNo: user?.ContactNo || null,
|
2322
2326
|
Email: user.Email,
|
2323
2327
|
Password: user.Password,
|
2324
2328
|
Status: user.Status,
|
@@ -34,6 +34,12 @@ export default class User extends Model {
|
|
34
34
|
})
|
35
35
|
UserId: number;
|
36
36
|
|
37
|
+
@Column({
|
38
|
+
allowNull: true,
|
39
|
+
type: DataType.STRING,
|
40
|
+
})
|
41
|
+
UserName: string;
|
42
|
+
|
37
43
|
@Column({
|
38
44
|
allowNull: false,
|
39
45
|
type: DataType.STRING,
|
@@ -41,16 +47,34 @@ export default class User extends Model {
|
|
41
47
|
Email: string;
|
42
48
|
|
43
49
|
@Column({
|
44
|
-
allowNull:
|
50
|
+
allowNull: false,
|
45
51
|
type: DataType.STRING,
|
46
52
|
})
|
47
|
-
|
53
|
+
Password: string;
|
48
54
|
|
49
55
|
@Column({
|
50
56
|
allowNull: false,
|
51
57
|
type: DataType.STRING,
|
52
58
|
})
|
53
|
-
|
59
|
+
FullName: string;
|
60
|
+
|
61
|
+
@Column({
|
62
|
+
allowNull: false,
|
63
|
+
type: DataType.STRING,
|
64
|
+
})
|
65
|
+
IdNo: string;
|
66
|
+
|
67
|
+
@Column({
|
68
|
+
allowNull: false,
|
69
|
+
type: DataType.STRING,
|
70
|
+
})
|
71
|
+
IdType: string;
|
72
|
+
|
73
|
+
@Column({
|
74
|
+
allowNull: false,
|
75
|
+
type: DataType.STRING,
|
76
|
+
})
|
77
|
+
ContactNo: string;
|
54
78
|
|
55
79
|
@Column({
|
56
80
|
allowNull: false,
|