lms-sync 1.0.92 → 1.0.94

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,106 @@
1
+ 'use strict';
2
+
3
+
4
+ module.exports = (sequelize, DataTypes) => {
5
+
6
+
7
+ const Applications = sequelize.define('Applications', {
8
+ _id: {
9
+ type: DataTypes.INTEGER,
10
+ unique: true,
11
+ allowNull: false,
12
+ autoIncrement: true,
13
+ primaryKey: true,
14
+ },
15
+ name: {
16
+ type: DataTypes.STRING,
17
+ unique: false,
18
+ allowNull: true,
19
+ autoIncrement: false,
20
+ primaryKey: false,
21
+ },
22
+ description: {
23
+ type: DataTypes.STRING,
24
+ unique: false,
25
+ allowNull: true,
26
+ autoIncrement: false,
27
+ primaryKey: false,
28
+ },
29
+ icon: {
30
+ type: DataTypes.STRING,
31
+ unique: false,
32
+ allowNull: true,
33
+ autoIncrement: false,
34
+ primaryKey: false,
35
+ },
36
+ clientSecretKey: {
37
+ type: DataTypes.STRING,
38
+ unique: false,
39
+ allowNull: true,
40
+ autoIncrement: false,
41
+ primaryKey: false,
42
+ },
43
+ applicationURL:{
44
+ type: DataTypes.STRING,
45
+ unique: false,
46
+ allowNull: true,
47
+ autoIncrement: false,
48
+ primaryKey: false,
49
+ },
50
+ successRedirectURL: {
51
+ type: DataTypes.STRING,
52
+ unique: false,
53
+ allowNull: true,
54
+ autoIncrement: false,
55
+ primaryKey: false,
56
+ },
57
+ failureRedirectURL: {
58
+ type: DataTypes.STRING,
59
+ unique: false,
60
+ allowNull: true,
61
+ autoIncrement: false,
62
+ primaryKey: false,
63
+ },
64
+ active: {
65
+ type: DataTypes.BOOLEAN,
66
+ unique: false,
67
+ allowNull: true,
68
+ autoIncrement: false,
69
+ primaryKey: false,
70
+ defaultValue: true
71
+ },
72
+ createdById: {
73
+ type: DataTypes.INTEGER,
74
+ unique: false,
75
+ allowNull: true,
76
+ autoIncrement: false,
77
+ primaryKey: false,
78
+
79
+ },
80
+ modifiedById: {
81
+ type: DataTypes.INTEGER,
82
+ unique: false,
83
+ allowNull: true,
84
+ autoIncrement: false,
85
+ primaryKey: false,
86
+ }
87
+ }, {
88
+ // createdAt: 'createdDate',
89
+ // updatedAt: 'modifiedDate',
90
+ sequelize,
91
+ schema: "public",
92
+ modelName: 'Applications'
93
+ });
94
+
95
+ Applications.beforeCreate(async (user, options) => {
96
+ user.createdAt = new Date();
97
+ user.active = true;
98
+ });
99
+
100
+ Applications.beforeSave(async (user, options) => {
101
+ user.updatedAt = new Date()
102
+ })
103
+
104
+
105
+ return Applications;
106
+ };
@@ -0,0 +1,78 @@
1
+ 'use strict';
2
+
3
+ module.exports = (sequelize, DataTypes) => {
4
+
5
+ const Roles = sequelize.define('Roles', {
6
+ _id: {
7
+ type: DataTypes.INTEGER,
8
+ unique: true,
9
+ allowNull: false,
10
+ autoIncrement: true,
11
+ primaryKey: true,
12
+ },
13
+ name: {
14
+ type: DataTypes.STRING,
15
+ unique: false,
16
+ allowNull: true,
17
+ autoIncrement: false,
18
+ primaryKey: false,
19
+ },
20
+ description: {
21
+ type: DataTypes.STRING,
22
+ unique: false,
23
+ allowNull: true,
24
+ autoIncrement: false,
25
+ primaryKey: false,
26
+ },
27
+ applicationId: {
28
+ type: DataTypes.INTEGER,
29
+ unique: false,
30
+ allowNull: false,
31
+ autoIncrement: false,
32
+ primaryKey: false,
33
+ },
34
+ active: {
35
+ type: DataTypes.BOOLEAN,
36
+ unique: false,
37
+ allowNull: true,
38
+ autoIncrement: false,
39
+ primaryKey: false,
40
+ defaultValue: true
41
+ },
42
+ createdById: {
43
+ type: DataTypes.INTEGER,
44
+ unique: false,
45
+ allowNull: true,
46
+ autoIncrement: false,
47
+ primaryKey: false,
48
+
49
+ },
50
+ modifiedById: {
51
+ type: DataTypes.INTEGER,
52
+ unique: false,
53
+ allowNull: true,
54
+ autoIncrement: false,
55
+ primaryKey: false,
56
+
57
+ }
58
+ }, {
59
+ // createdAt: 'createdDate',
60
+ // updatedAt: 'modifiedDate',
61
+ sequelize,
62
+ schema: "public_migrations",
63
+ modelName: 'Roles'
64
+
65
+ });
66
+
67
+ Roles.beforeCreate(async (user, options) => {
68
+ user.createdAt = new Date();
69
+ user.active = true;
70
+ });
71
+
72
+ Roles.beforeSave(async (user, options) => {
73
+ user.updatedAt = new Date()
74
+ })
75
+
76
+
77
+ return Roles;
78
+ };
@@ -0,0 +1,80 @@
1
+ 'use strict';
2
+
3
+
4
+ module.exports = (sequelize, DataTypes, schema) => {
5
+
6
+
7
+ const UserRoles = sequelize.define('UserRoles', {
8
+ _id: {
9
+ type: DataTypes.INTEGER,
10
+ unique: true,
11
+ allowNull: false,
12
+ autoIncrement: true,
13
+ primaryKey: true,
14
+ },
15
+ applicationId: {
16
+ type: DataTypes.INTEGER,
17
+ unique: false,
18
+ allowNull: true,
19
+ autoIncrement: false,
20
+ primaryKey: false,
21
+
22
+ },
23
+ active: {
24
+ type: DataTypes.BOOLEAN,
25
+ unique: false,
26
+ allowNull: true,
27
+ autoIncrement: false,
28
+ primaryKey: false,
29
+ defaultValue: true
30
+ },
31
+ createdById: {
32
+ type: DataTypes.INTEGER,
33
+ unique: false,
34
+ allowNull: true,
35
+ autoIncrement: false,
36
+ primaryKey: false,
37
+
38
+ },
39
+ modifiedById: {
40
+ type: DataTypes.INTEGER,
41
+ unique: false,
42
+ allowNull: true,
43
+ autoIncrement: false,
44
+ primaryKey: false,
45
+ },
46
+ roleId: {
47
+ type: DataTypes.INTEGER,
48
+ unique: false,
49
+ allowNull: true,
50
+ autoIncrement: false,
51
+ primaryKey: false,
52
+
53
+ },
54
+ userId: {
55
+ type: DataTypes.INTEGER,
56
+ unique: false,
57
+ allowNull: true,
58
+ autoIncrement: false,
59
+ primaryKey: false,
60
+ }
61
+ }, {
62
+ // createdAt: 'createdDate',
63
+ // updatedAt: 'modifiedDate',
64
+ sequelize,
65
+ schema: schema,
66
+ modelName: 'UserRoles'
67
+ });
68
+
69
+ UserRoles.beforeCreate(async (user, options) => {
70
+ user.createdAt = new Date();
71
+ user.active = true;
72
+ });
73
+
74
+ UserRoles.beforeSave(async (user, options) => {
75
+ user.updatedAt = new Date()
76
+ })
77
+
78
+
79
+ return UserRoles;
80
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lms-sync",
3
- "version": "1.0.92",
3
+ "version": "1.0.94",
4
4
  "description": "Migration App for MSC LMS",
5
5
  "main": "index.js",
6
6
  "scripts": {