tango-api-schema 2.0.20 → 2.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -12,6 +12,8 @@ import applicationDefaultModel from "./schema/applicationDefault.model.js";
12
12
  import cameraModel from "./schema/camera.model.js";
13
13
  import reportModel from "./schema/report.model.js";
14
14
  import standaredRoleModel from "./schema/standaredRole.model.js";
15
+ import userPermissionModel from "./schema/userPermission.model.js";
16
+ import infraReasonModel from "./infraReason.model.js";
15
17
 
16
18
 
17
19
  export default {
@@ -28,5 +30,7 @@ export default {
28
30
  applicationDefaultModel,
29
31
  cameraModel,
30
32
  reportModel,
31
- standaredRoleModel
33
+ standaredRoleModel,
34
+ userPermissionModel,
35
+ infraReasonModel
32
36
  };
@@ -0,0 +1,42 @@
1
+ import mongoose from 'mongoose';
2
+
3
+ const infraReasons = new mongoose.Schema(
4
+ {
5
+ name: {
6
+ type: String,
7
+ },
8
+ parentId: {
9
+ type: mongoose.Types.ObjectId
10
+ },
11
+ order: {
12
+ type: Number
13
+ },
14
+ toolTips: [
15
+ {
16
+ name: {
17
+ type: String
18
+ },
19
+ order: {
20
+ type: Number
21
+ },
22
+ }
23
+ ],
24
+ stepstoResolve: [{
25
+ name: {
26
+ type: String
27
+ },
28
+ order: {
29
+ type: Number
30
+ },
31
+ }
32
+ ],
33
+ },
34
+ {
35
+ strict: true,
36
+ versionKey: false,
37
+ timestamps: true,
38
+ },
39
+ );
40
+
41
+
42
+ export default mongoose.model('infraReasons', infraReasons, 'infraReasons');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tango-api-schema",
3
- "version": "2.0.20",
3
+ "version": "2.0.22",
4
4
  "description": "tangoEye model schema",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -18,6 +18,9 @@ const user = new mongoose.Schema(
18
18
  type: String,
19
19
  required: true,
20
20
  },
21
+ clientId: {
22
+ type: String,
23
+ },
21
24
  role: {
22
25
  type: String,
23
26
  enum: [ 'superadmin', 'admin', 'user' ],
@@ -25,7 +28,7 @@ const user = new mongoose.Schema(
25
28
  },
26
29
  isActive: {
27
30
  type: Boolean,
28
- default: false,
31
+ default: true,
29
32
  },
30
33
  // Assigned: {
31
34
  // type: {
@@ -68,4 +68,4 @@ const userPermission = new mongoose.Schema(
68
68
  );
69
69
 
70
70
  userPermission.plugin( mongooseUniqueValidator );
71
- export default mongoose.model( 'userPermission', userPermission );
71
+ export default mongoose.model( 'userPermission', userPermission ,'userPermission');