tango-api-schema 1.0.10 → 1.0.12
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 +4 -0
- package/package.json +1 -1
- package/schema/client.model.js +8 -1
- package/schema/nob.model.js +39 -0
- package/schema/nobClient.model.js +26 -0
- package/schema/token.model.js +1 -0
package/index.js
CHANGED
|
@@ -5,6 +5,8 @@ import clientModel from "./schema/client.model.js";
|
|
|
5
5
|
import dailyAuditFilesModel from "./schema/dailyAuditFiles.model.js";
|
|
6
6
|
import dailyAuditStoreFilesModel from "./schema/dailyAuditStoreFiles.model.js";
|
|
7
7
|
import tokenModel from "./schema/token.model.js";
|
|
8
|
+
import nobModel from './schema/nob.model.js';
|
|
9
|
+
import nobClientModel from './schema/nobClient.model.js';
|
|
8
10
|
|
|
9
11
|
export default {
|
|
10
12
|
clientModel,
|
|
@@ -14,4 +16,6 @@ export default {
|
|
|
14
16
|
dailyAuditFilesModel,
|
|
15
17
|
dailyAuditStoreFilesModel,
|
|
16
18
|
tokenModel,
|
|
19
|
+
nobModel,
|
|
20
|
+
nobClientModel
|
|
17
21
|
};
|
package/package.json
CHANGED
package/schema/client.model.js
CHANGED
|
@@ -128,7 +128,14 @@ const clientSchema=new mongoose.Schema( {
|
|
|
128
128
|
default: 'trial',
|
|
129
129
|
},
|
|
130
130
|
reportConfigs: {
|
|
131
|
-
|
|
131
|
+
report: {
|
|
132
|
+
type: Boolean,
|
|
133
|
+
default: true,
|
|
134
|
+
},
|
|
135
|
+
reportName: {
|
|
136
|
+
type: String,
|
|
137
|
+
required: true,
|
|
138
|
+
},
|
|
132
139
|
},
|
|
133
140
|
auditConfigs: {
|
|
134
141
|
count: {
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Schema, model } from 'mongoose';
|
|
2
|
+
|
|
3
|
+
const nobSchema=new Schema( {
|
|
4
|
+
|
|
5
|
+
client: { // client_Id changed to clientId
|
|
6
|
+
type: Schema.Types.ObjectId,
|
|
7
|
+
ref: 'Brand',
|
|
8
|
+
},
|
|
9
|
+
clientId: {
|
|
10
|
+
type: String,
|
|
11
|
+
trim: true,
|
|
12
|
+
},
|
|
13
|
+
storeId: {
|
|
14
|
+
type: String,
|
|
15
|
+
trim: true,
|
|
16
|
+
},
|
|
17
|
+
nobDate: {
|
|
18
|
+
type: Date,
|
|
19
|
+
required: true,
|
|
20
|
+
},
|
|
21
|
+
store: {
|
|
22
|
+
type: Schema.Types.ObjectId,
|
|
23
|
+
ref: 'Store',
|
|
24
|
+
},
|
|
25
|
+
nobCount: {
|
|
26
|
+
type: Number,
|
|
27
|
+
trim: true,
|
|
28
|
+
},
|
|
29
|
+
nobAmount: {
|
|
30
|
+
type: Schema.Types.Decimal128,
|
|
31
|
+
default: '0.0',
|
|
32
|
+
},
|
|
33
|
+
}, {
|
|
34
|
+
strict: true,
|
|
35
|
+
versionKey: false,
|
|
36
|
+
timestamps: true,
|
|
37
|
+
} );
|
|
38
|
+
|
|
39
|
+
export default model( 'nobBilling', nobSchema, 'nobBilling' );
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @name api_stores_models_store
|
|
3
|
+
* @description Store Schema
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
// NPM Modules
|
|
7
|
+
import { Schema, model } from 'mongoose';
|
|
8
|
+
|
|
9
|
+
// Schema
|
|
10
|
+
const collection = new Schema(
|
|
11
|
+
{
|
|
12
|
+
source: {
|
|
13
|
+
type: Object,
|
|
14
|
+
trim: true,
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
timestamps: true,
|
|
19
|
+
versionKey: false,
|
|
20
|
+
strict: true,
|
|
21
|
+
},
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
// collection.plugin(uniqueValidator);
|
|
25
|
+
|
|
26
|
+
export default model( 'nobClient', collection, 'nobClient' );
|