tango-api-schema 2.0.132 → 2.0.134

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tango-api-schema",
3
- "version": "2.0.132",
3
+ "version": "2.0.134",
4
4
  "description": "tangoEye model schema",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -1,5 +1,4 @@
1
1
  import mongoose from "mongoose";
2
- import mongooseUniqueValidator from "mongoose-unique-validator";
3
2
 
4
3
  const externalParameter = new mongoose.Schema(
5
4
  {
@@ -7,18 +6,18 @@ const externalParameter = new mongoose.Schema(
7
6
  type: String,
8
7
  trim: true,
9
8
  required: true,
10
- unique: true,
11
9
  },
12
10
  productName:{
13
- type: String
11
+ type: String,
12
+ required:true
14
13
  },
15
14
  zoneName:{
16
- type: String
15
+ type: String,
16
+ required:true
17
17
  },
18
18
  clientId: {
19
19
  type: String,
20
20
  trim: true,
21
- required: true,
22
21
  },
23
22
  isAlwaysAudit: {
24
23
  type: Boolean,
@@ -198,7 +197,6 @@ const externalParameter = new mongoose.Schema(
198
197
  }
199
198
  );
200
199
 
201
- externalParameter.index({ storeId: 1, clientId: 1, appId: 1 });
202
- externalParameter.plugin(mongooseUniqueValidator);
200
+ externalParameter.index({ storeId: 1, zoneName:1 });
203
201
 
204
- export default mongoose.model("externalParameter", externalParameter, externalParameter);
202
+ export default mongoose.model("externalParameter", externalParameter, "externalParameter");