tango-api-schema 1.0.14 → 1.0.16

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": "1.0.14",
3
+ "version": "1.0.16",
4
4
  "description": "tangoEye model schema",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -1,9 +1,9 @@
1
- import { Schema, model } from 'mongoose';
1
+ import mongoose from 'mongoose';
2
2
 
3
- const nobSchema=new Schema( {
3
+ const nobSchema=new mongoose.Schema( {
4
4
 
5
5
  client: { // client_Id changed to clientId
6
- type: Schema.Types.ObjectId,
6
+ type: mongoose.Schema.Types.ObjectId,
7
7
  ref: 'Brand',
8
8
  },
9
9
  clientId: {
@@ -19,7 +19,7 @@ const nobSchema=new Schema( {
19
19
  required: true,
20
20
  },
21
21
  store: {
22
- type: Schema.Types.ObjectId,
22
+ type: mongoose.Schema.Types.ObjectId,
23
23
  ref: 'Store',
24
24
  },
25
25
  nobCount: {
@@ -27,8 +27,8 @@ const nobSchema=new Schema( {
27
27
  trim: true,
28
28
  },
29
29
  nobAmount: {
30
- type: Schema.Types.Decimal128,
31
- default: '0.0',
30
+ type: mongoose.Schema.Types.Decimal128,
31
+ //default: '0.0',
32
32
  },
33
33
  }, {
34
34
  strict: true,
@@ -36,4 +36,4 @@ const nobSchema=new Schema( {
36
36
  timestamps: true,
37
37
  } );
38
38
 
39
- export default model( 'nobBilling', nobSchema, 'nobBilling' );
39
+ export default mongoose.model( 'nobBilling', nobSchema, 'nobBilling' );
@@ -4,10 +4,10 @@
4
4
  */
5
5
 
6
6
  // NPM Modules
7
- import { Schema, model } from 'mongoose';
7
+ import mongoose from 'mongoose';
8
8
 
9
9
  // Schema
10
- const collection = new Schema(
10
+ const collection = new mongoose.Schema(
11
11
  {
12
12
  source: {
13
13
  type: Object,
@@ -23,4 +23,4 @@ const collection = new Schema(
23
23
 
24
24
  // collection.plugin(uniqueValidator);
25
25
 
26
- export default model( 'nobClient', collection, 'nobClient' );
26
+ export default mongoose.model( 'nobClient', collection, 'nobClient' );
@@ -58,7 +58,7 @@ const collection = new mongoose.Schema(
58
58
  },
59
59
  groups: [
60
60
  {
61
- type: Schema.Types.ObjectId,
61
+ type: mongoose.Schema.Types.ObjectId,
62
62
  ref: "Group",
63
63
  },
64
64
  ],
@@ -92,4 +92,4 @@ const collection = new mongoose.Schema(
92
92
  // Plugins
93
93
  collection.plugin(uniqueValidator);
94
94
 
95
- export default model("User", collection);
95
+ export default mongoose.model("User", collection);