@tomei/sso 0.34.8 → 0.34.10

Sign up to get free protection for your applications and to get access to all the features.
@@ -25,7 +25,7 @@ module.exports = {
25
25
  },
26
26
  FullName: {
27
27
  type: Sequelize.STRING(200),
28
- allowNull: false,
28
+ allowNull: true,
29
29
  },
30
30
  IdNo: {
31
31
  type: Sequelize.STRING(50),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tomei/sso",
3
- "version": "0.34.8",
3
+ "version": "0.34.10",
4
4
  "description": "Tomei SSO Package",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -1020,8 +1020,7 @@ export class User extends UserBase {
1020
1020
  }
1021
1021
  //If Params.IdNo is not null, then Params.IdType is required and vice versa.
1022
1022
  if (IdType && IdNo) {
1023
- where[Op.or]['IdType'] = IdType;
1024
- where[Op.or]['IdNo'] = IdNo;
1023
+ where[Op.and] = [{ IdType: IdType }, { IdNo: IdNo }];
1025
1024
  }
1026
1025
  if (ContactNo) {
1027
1026
  where[Op.or]['ContactNo'] = ContactNo;
@@ -1345,6 +1344,9 @@ export class User extends UserBase {
1345
1344
  {
1346
1345
  Email: userInfo.Email,
1347
1346
  UserName: userInfo.UserName,
1347
+ FullName: userInfo.FullName,
1348
+ IdNo: userInfo.IDNo,
1349
+ IdType: userInfo.IDType,
1348
1350
  Password: userInfo.Password,
1349
1351
  Status: userInfo.Status,
1350
1352
  DefaultPasswordChangedYN: userInfo.DefaultPasswordChangedYN,
@@ -32,18 +32,6 @@ export default class Staff extends Model {
32
32
  })
33
33
  UserId: number;
34
34
 
35
- @Column({
36
- allowNull: false,
37
- type: DataType.STRING(200),
38
- })
39
- FullName: string;
40
-
41
- @Column({
42
- allowNull: false,
43
- type: DataType.STRING(200),
44
- })
45
- PreferredName: string;
46
-
47
35
  @Column({
48
36
  allowNull: true,
49
37
  type: DataType.STRING(20),
@@ -68,12 +56,6 @@ export default class Staff extends Model {
68
56
  })
69
57
  CarPlate: string;
70
58
 
71
- @Column({
72
- allowNull: true,
73
- type: DataType.STRING(20),
74
- })
75
- Mobile: string;
76
-
77
59
  @Column({
78
60
  allowNull: true,
79
61
  type: DataType.INTEGER,
@@ -53,25 +53,25 @@ export default class User extends Model {
53
53
  Password: string;
54
54
 
55
55
  @Column({
56
- allowNull: false,
56
+ allowNull: true,
57
57
  type: DataType.STRING,
58
58
  })
59
59
  FullName: string;
60
60
 
61
61
  @Column({
62
- allowNull: false,
62
+ allowNull: true,
63
63
  type: DataType.STRING,
64
64
  })
65
65
  IdNo: string;
66
66
 
67
67
  @Column({
68
- allowNull: false,
68
+ allowNull: true,
69
69
  type: DataType.STRING,
70
70
  })
71
71
  IdType: string;
72
72
 
73
73
  @Column({
74
- allowNull: false,
74
+ allowNull: true,
75
75
  type: DataType.STRING,
76
76
  })
77
77
  ContactNo: string;