tango-api-schema 1.0.6 → 1.0.7
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 +16 -6
- package/package.json +1 -1
- package/schema/dailyAuditFiles.model.js +44 -0
- package/schema/dailyAuditStoreFiles.model.js +54 -0
- package/schema/token.model.js +28 -0
package/index.js
CHANGED
|
@@ -1,7 +1,17 @@
|
|
|
1
|
-
import brandModel from
|
|
2
|
-
import storeModel from
|
|
3
|
-
import cameraModel from
|
|
1
|
+
import brandModel from "./schema/brand.model.js";
|
|
2
|
+
import storeModel from "./schema/stores.model.js";
|
|
3
|
+
import cameraModel from "./schema/camera.model.js";
|
|
4
|
+
import clientModel from "./schema/client.model.js";
|
|
5
|
+
import dailyAuditFilesModel from "./schema/dailyAuditFiles.model.js";
|
|
6
|
+
import dailyAuditStoreFilesModel from "./schema/dailyAuditStoreFiles.model.js";
|
|
7
|
+
import tokenModel from "./schema/token.model.js";
|
|
4
8
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
9
|
+
export default {
|
|
10
|
+
clientModel,
|
|
11
|
+
cameraModel,
|
|
12
|
+
storeModel,
|
|
13
|
+
brandModel,
|
|
14
|
+
dailyAuditFilesModel,
|
|
15
|
+
dailyAuditStoreFilesModel,
|
|
16
|
+
tokenModel,
|
|
17
|
+
};
|
package/package.json
CHANGED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @name api_audit
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
// NPM Modules
|
|
6
|
+
import mongoose from 'mongoose';
|
|
7
|
+
import mongooseUniqueValidator from 'mongoose-unique-validator';
|
|
8
|
+
|
|
9
|
+
// Schema
|
|
10
|
+
const auditFilesCount = new mongoose.Schema( {
|
|
11
|
+
client: {
|
|
12
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
13
|
+
},
|
|
14
|
+
clientId: {
|
|
15
|
+
type: String,
|
|
16
|
+
},
|
|
17
|
+
clientName: {
|
|
18
|
+
type: String,
|
|
19
|
+
},
|
|
20
|
+
fileDate: {
|
|
21
|
+
type: String,
|
|
22
|
+
},
|
|
23
|
+
fileDateISO: {
|
|
24
|
+
type: Date,
|
|
25
|
+
},
|
|
26
|
+
queueName: {
|
|
27
|
+
type: String,
|
|
28
|
+
},
|
|
29
|
+
installedStore: {
|
|
30
|
+
type: Number,
|
|
31
|
+
},
|
|
32
|
+
totalFilesCount: {
|
|
33
|
+
type: Number,
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
timestamps: true,
|
|
38
|
+
strict: true,
|
|
39
|
+
versionKey: false,
|
|
40
|
+
} );
|
|
41
|
+
|
|
42
|
+
auditFilesCount.plugin( mongooseUniqueValidator );
|
|
43
|
+
|
|
44
|
+
export default mongoose.model( 'audit_files_count', auditFilesCount, 'audit_files_count' );
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @name api_audit
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
// NPM Modules
|
|
6
|
+
import mongoose from 'mongoose';
|
|
7
|
+
import mongooseUniqueValidator from 'mongoose-unique-validator';
|
|
8
|
+
|
|
9
|
+
// Schema
|
|
10
|
+
const auditFilesCount = new mongoose.Schema( {
|
|
11
|
+
client: {
|
|
12
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
13
|
+
},
|
|
14
|
+
clientId: {
|
|
15
|
+
type: String,
|
|
16
|
+
},
|
|
17
|
+
clientName: {
|
|
18
|
+
type: String,
|
|
19
|
+
},
|
|
20
|
+
fileDate: {
|
|
21
|
+
type: String,
|
|
22
|
+
},
|
|
23
|
+
fileDateISO: {
|
|
24
|
+
type: Date,
|
|
25
|
+
},
|
|
26
|
+
queueName: {
|
|
27
|
+
type: String,
|
|
28
|
+
},
|
|
29
|
+
installedStore: {
|
|
30
|
+
type: Number,
|
|
31
|
+
},
|
|
32
|
+
totalFilesCount: {
|
|
33
|
+
type: Number,
|
|
34
|
+
},
|
|
35
|
+
totalCount: {
|
|
36
|
+
type: Number,
|
|
37
|
+
},
|
|
38
|
+
storeId: {
|
|
39
|
+
type: String,
|
|
40
|
+
},
|
|
41
|
+
sqs: {
|
|
42
|
+
type: Object,
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
timestamps: true,
|
|
47
|
+
strict: true,
|
|
48
|
+
versionKey: false,
|
|
49
|
+
} );
|
|
50
|
+
|
|
51
|
+
auditFilesCount.plugin( mongooseUniqueValidator );
|
|
52
|
+
auditFilesCount.index( { createdAt: 1 } );
|
|
53
|
+
|
|
54
|
+
export default mongoose.model( 'audit_storefiles_count', auditFilesCount, 'audit_storefiles_count' );
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// NPM Modules
|
|
2
|
+
import mongoose from 'mongoose';
|
|
3
|
+
const tokenSchema = mongoose.Schema( {
|
|
4
|
+
token: {
|
|
5
|
+
type: String,
|
|
6
|
+
trim: true,
|
|
7
|
+
unique: true,
|
|
8
|
+
required: true,
|
|
9
|
+
},
|
|
10
|
+
type: {
|
|
11
|
+
type: String,
|
|
12
|
+
enum: [ 'access-token', 'verify-user', 'forgot-pwd', 'reset-pwd', 'email-otp', 'phone-otp', 'edgeapp-access-token', 'cron' ],
|
|
13
|
+
default: 'access-token',
|
|
14
|
+
},
|
|
15
|
+
createdAt: {
|
|
16
|
+
type: Date,
|
|
17
|
+
default: Date.now,
|
|
18
|
+
},
|
|
19
|
+
user: {
|
|
20
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
21
|
+
ref: 'User',
|
|
22
|
+
},
|
|
23
|
+
}, {
|
|
24
|
+
strict: true,
|
|
25
|
+
versionKey: false,
|
|
26
|
+
} );
|
|
27
|
+
|
|
28
|
+
export default mongoose.model( 'adminToken', tokenSchema, 'adminToken' );
|