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 +1 -1
- package/schema/nob.model.js +7 -7
- package/schema/nobClient.model.js +3 -3
- package/schema/user.model.js +2 -2
package/package.json
CHANGED
package/schema/nob.model.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
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
|
|
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' );
|
package/schema/user.model.js
CHANGED
|
@@ -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);
|