tango-api-schema 2.0.41 → 2.0.43

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,7 +12,6 @@ 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
15
  import infraReasonModel from "./schema/infraReason.model.js";
17
16
  import groupModel from './schema/group.model.js';
18
17
  import authenticationModel from './schema/authentication.model.js';
@@ -38,7 +37,6 @@ export default {
38
37
  cameraModel,
39
38
  reportModel,
40
39
  standaredRoleModel,
41
- userPermissionModel,
42
40
  infraReasonModel,
43
41
  groupModel,
44
42
  authenticationModel,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tango-api-schema",
3
- "version": "2.0.41",
3
+ "version": "2.0.43",
4
4
  "description": "tangoEye model schema",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -14,7 +14,11 @@ const group = new mongoose.Schema(
14
14
  },
15
15
  description: {
16
16
  type: String
17
- }
17
+ },
18
+ isActive: {
19
+ type: Boolean,
20
+ default: true
21
+ }
18
22
  },
19
23
  {
20
24
  strict: true,
@@ -33,15 +33,32 @@ const user = new mongoose.Schema(
33
33
  type: Boolean,
34
34
  default: true,
35
35
  },
36
- // Assigned: {
37
- // type: {
38
- // type: String,
39
- // enum: [ 'store', 'group' ],
40
- // },
41
- // list: {
42
- // type: Array,
43
- // },
44
- // },
36
+ permission: [
37
+ {
38
+ featureName: {
39
+ type: String,
40
+ },
41
+ product: [
42
+ {
43
+ name: {
44
+ type: String,
45
+ },
46
+ isView: {
47
+ type: Boolean,
48
+ },
49
+ isEdit: {
50
+ type: Boolean,
51
+ },
52
+ isDownload: {
53
+ type: Boolean,
54
+ },
55
+ isDelete: {
56
+ type: Boolean,
57
+ },
58
+ },
59
+ ],
60
+ },
61
+ ],
45
62
  userType:{
46
63
  type: String,
47
64
  enum:['tango','client']
@@ -11,14 +11,12 @@ const userAssigned = new mongoose.Schema(
11
11
  clientId:{
12
12
  type: String
13
13
  },
14
- Assigned: {
15
- type: {
16
- type: String,
17
- enum: [ 'store', 'group' , 'client'],
18
- },
19
- list: {
20
- type: Array,
21
- },
14
+ assignedType: {
15
+ type: String,
16
+ enum: [ 'store', 'group', 'client'],
17
+ },
18
+ assignedvalue: {
19
+ type: String
22
20
  },
23
21
  userType:{
24
22
  type: String,
@@ -1,71 +0,0 @@
1
- import mongoose from 'mongoose';
2
- import mongooseUniqueValidator from 'mongoose-unique-validator';
3
-
4
- const userPermission = new mongoose.Schema(
5
- {
6
- userName: {
7
- type: String,
8
- },
9
- email: {
10
- type: String,
11
- required: true,
12
- unique: true,
13
- },
14
- clientId:{
15
- type: String
16
- },
17
- role: {
18
- type: String,
19
- enum: [ 'superadmin', 'admin', 'user' ],
20
- default: 'user',
21
- },
22
- // Assigned: {
23
- // type: {
24
- // type: String,
25
- // enum: [ 'store', 'group' ],
26
- // },
27
- // list: {
28
- // type: Array,
29
- // },
30
- // },
31
- userType:{
32
- type: String,
33
- enum:['tango','client']
34
- },
35
- permission: [
36
- {
37
- featureName: {
38
- type: String,
39
- },
40
- product: [
41
- {
42
- name: {
43
- type: String,
44
- },
45
- isView: {
46
- type: Boolean,
47
- },
48
- isEdit: {
49
- type: Boolean,
50
- },
51
- isDownload: {
52
- type: Boolean,
53
- },
54
- isDelete: {
55
- type: Boolean,
56
- },
57
- },
58
- ],
59
- },
60
- ],
61
-
62
- },
63
- {
64
- strict: true,
65
- versionKey: false,
66
- timestamps: true,
67
- },
68
- );
69
-
70
- userPermission.plugin( mongooseUniqueValidator );
71
- export default mongoose.model( 'userPermission', userPermission ,'userPermission');