tango-api-schema 2.0.8 → 2.0.9
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/applicationDefault.model.js +24 -0
- package/schema/camera.model.js +119 -0
- package/schema/client.model.js +11 -3
- package/schema/iplogs.js +40 -0
- package/schema/report.model.js +33 -0
- package/schema/store.model.js +106 -3
package/package.json
CHANGED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Schema, model } from 'mongoose';
|
|
2
|
+
|
|
3
|
+
const collection = new Schema(
|
|
4
|
+
{
|
|
5
|
+
type: {
|
|
6
|
+
type: String,
|
|
7
|
+
},
|
|
8
|
+
subType: {
|
|
9
|
+
type: String,
|
|
10
|
+
},
|
|
11
|
+
data: {
|
|
12
|
+
type: Object,
|
|
13
|
+
},
|
|
14
|
+
active: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
timestamps: true,
|
|
20
|
+
strict: true,
|
|
21
|
+
versionKey: false,
|
|
22
|
+
} );
|
|
23
|
+
|
|
24
|
+
export default model( 'applicationDefault', collection, 'applicationDefault' );
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { Schema, model } from 'mongoose';
|
|
2
|
+
|
|
3
|
+
const collection = new Schema(
|
|
4
|
+
{
|
|
5
|
+
store: {
|
|
6
|
+
type: Schema.Types.ObjectId,
|
|
7
|
+
ref: 'Store',
|
|
8
|
+
required: true,
|
|
9
|
+
},
|
|
10
|
+
storeId: {
|
|
11
|
+
type: String,
|
|
12
|
+
trim: true,
|
|
13
|
+
},
|
|
14
|
+
masterServer: {
|
|
15
|
+
type: String,
|
|
16
|
+
trim: true,
|
|
17
|
+
},
|
|
18
|
+
clientId: {
|
|
19
|
+
type: String,
|
|
20
|
+
trim: true,
|
|
21
|
+
},
|
|
22
|
+
client: {
|
|
23
|
+
type: Schema.Types.ObjectId,
|
|
24
|
+
ref: 'client',
|
|
25
|
+
required: true,
|
|
26
|
+
},
|
|
27
|
+
// tagging: [ // need to disscuss with praveen
|
|
28
|
+
// {
|
|
29
|
+
// type: Schema.Types.ObjectId,
|
|
30
|
+
// ref: 'Tagging',
|
|
31
|
+
// },
|
|
32
|
+
// ],
|
|
33
|
+
ip: {
|
|
34
|
+
type: String,
|
|
35
|
+
trim: true,
|
|
36
|
+
},
|
|
37
|
+
manufacture: {
|
|
38
|
+
type: String,
|
|
39
|
+
trim: true,
|
|
40
|
+
},
|
|
41
|
+
camNumber: {
|
|
42
|
+
type: String,
|
|
43
|
+
trim: true,
|
|
44
|
+
},
|
|
45
|
+
userName: {
|
|
46
|
+
type: String,
|
|
47
|
+
trim: true,
|
|
48
|
+
},
|
|
49
|
+
password: {
|
|
50
|
+
type: String,
|
|
51
|
+
trim: true,
|
|
52
|
+
},
|
|
53
|
+
subType: {
|
|
54
|
+
type: String,
|
|
55
|
+
trim: true,
|
|
56
|
+
},
|
|
57
|
+
RTSP: {
|
|
58
|
+
type: String,
|
|
59
|
+
trim: true,
|
|
60
|
+
},
|
|
61
|
+
retentionPeriod: {
|
|
62
|
+
type: Number,
|
|
63
|
+
},
|
|
64
|
+
streamName: {
|
|
65
|
+
type: String,
|
|
66
|
+
trim: true,
|
|
67
|
+
unique: true,
|
|
68
|
+
},
|
|
69
|
+
thumbnailImage: {
|
|
70
|
+
type: String,
|
|
71
|
+
trim: true,
|
|
72
|
+
},
|
|
73
|
+
status: {
|
|
74
|
+
type: String,
|
|
75
|
+
trim: true,
|
|
76
|
+
},
|
|
77
|
+
isActivated: {
|
|
78
|
+
type: Boolean,
|
|
79
|
+
},
|
|
80
|
+
isUp: {
|
|
81
|
+
type: Boolean,
|
|
82
|
+
},
|
|
83
|
+
captureAt: {
|
|
84
|
+
type: Date,
|
|
85
|
+
default: Date.now,
|
|
86
|
+
},
|
|
87
|
+
macId: {
|
|
88
|
+
type: String,
|
|
89
|
+
},
|
|
90
|
+
timeElapsed: {
|
|
91
|
+
type: Number,
|
|
92
|
+
default: 13,
|
|
93
|
+
},
|
|
94
|
+
dataProcess: {
|
|
95
|
+
type: Boolean,
|
|
96
|
+
default: false,
|
|
97
|
+
},
|
|
98
|
+
camName: {
|
|
99
|
+
type: String,
|
|
100
|
+
trim: true,
|
|
101
|
+
},
|
|
102
|
+
filters: {
|
|
103
|
+
yolo: {
|
|
104
|
+
type: String,
|
|
105
|
+
default: true
|
|
106
|
+
},
|
|
107
|
+
yoloProcess: {
|
|
108
|
+
type: String,
|
|
109
|
+
default: 10
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
strict: true,
|
|
115
|
+
versionKey: false,
|
|
116
|
+
timestamps: true
|
|
117
|
+
} );
|
|
118
|
+
|
|
119
|
+
export default model( 'camera', collection );
|
package/schema/client.model.js
CHANGED
|
@@ -67,7 +67,7 @@ const client = new mongoose.Schema(
|
|
|
67
67
|
},
|
|
68
68
|
status: {
|
|
69
69
|
type: String,
|
|
70
|
-
enum: [ 'active', 'deactive', 'hold' ],
|
|
70
|
+
enum: [ 'active', 'deactive', 'hold', 'suspended' ],
|
|
71
71
|
default: 'active'
|
|
72
72
|
},
|
|
73
73
|
profileDetails: {
|
|
@@ -194,7 +194,7 @@ const client = new mongoose.Schema(
|
|
|
194
194
|
type: Boolean,
|
|
195
195
|
default: false,
|
|
196
196
|
},
|
|
197
|
-
|
|
197
|
+
domainName: {
|
|
198
198
|
type: Array,
|
|
199
199
|
},
|
|
200
200
|
},
|
|
@@ -221,7 +221,15 @@ const client = new mongoose.Schema(
|
|
|
221
221
|
type: Number,
|
|
222
222
|
},
|
|
223
223
|
},
|
|
224
|
-
|
|
224
|
+
missedOpportunityFrom: {
|
|
225
|
+
condition: {
|
|
226
|
+
type: String,
|
|
227
|
+
},
|
|
228
|
+
value: {
|
|
229
|
+
type: Number,
|
|
230
|
+
},
|
|
231
|
+
},
|
|
232
|
+
missedOpportunityTo: {
|
|
225
233
|
condition: {
|
|
226
234
|
type: String,
|
|
227
235
|
},
|
package/schema/iplogs.js
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import mongoose from 'mongoose';
|
|
2
|
+
import uniqueValidator from 'mongoose-unique-validator';
|
|
3
|
+
const collection = new mongoose.Schema(
|
|
4
|
+
{
|
|
5
|
+
ipDetails: [
|
|
6
|
+
{
|
|
7
|
+
ip: {
|
|
8
|
+
type: String,
|
|
9
|
+
trim: true,
|
|
10
|
+
},
|
|
11
|
+
manufacturer: {
|
|
12
|
+
type: String,
|
|
13
|
+
trim: true,
|
|
14
|
+
},
|
|
15
|
+
macId: {
|
|
16
|
+
type: String,
|
|
17
|
+
trim: true,
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
],
|
|
21
|
+
storeId: {
|
|
22
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
23
|
+
ref: 'Store',
|
|
24
|
+
},
|
|
25
|
+
brandId: {
|
|
26
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
27
|
+
ref: 'Brand',
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
timestamps: true,
|
|
32
|
+
versionKey: false,
|
|
33
|
+
strict: true,
|
|
34
|
+
},
|
|
35
|
+
);
|
|
36
|
+
collection.index( { createdAt: 1 }, { expires: '1d' } );
|
|
37
|
+
collection.index( { storeId: 1 } );
|
|
38
|
+
collection.plugin( uniqueValidator );
|
|
39
|
+
|
|
40
|
+
export default mongoose.model( 'ipLog', collection, 'ipLog' );
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Schema, model } from 'mongoose';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
const reportschema = new Schema( {
|
|
5
|
+
fileName: {
|
|
6
|
+
type: String,
|
|
7
|
+
required: true,
|
|
8
|
+
},
|
|
9
|
+
fileType: {
|
|
10
|
+
type: String,
|
|
11
|
+
required: true,
|
|
12
|
+
},
|
|
13
|
+
reportName: {
|
|
14
|
+
type: String,
|
|
15
|
+
},
|
|
16
|
+
email: {
|
|
17
|
+
type: Array,
|
|
18
|
+
required: true,
|
|
19
|
+
},
|
|
20
|
+
clientId: {
|
|
21
|
+
type: String,
|
|
22
|
+
},
|
|
23
|
+
client: {
|
|
24
|
+
type: Schema.Types.ObjectId,
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
strict: true,
|
|
29
|
+
versionKey: false,
|
|
30
|
+
timestamps: true,
|
|
31
|
+
} );
|
|
32
|
+
|
|
33
|
+
export default model( 'report', reportschema );
|
package/schema/store.model.js
CHANGED
|
@@ -69,11 +69,114 @@ const store = new mongoose.Schema(
|
|
|
69
69
|
type: String,
|
|
70
70
|
enum: ['active','suspend','deactive']
|
|
71
71
|
},
|
|
72
|
+
|
|
72
73
|
edge: {
|
|
74
|
+
timeZone: {
|
|
75
|
+
type: String,
|
|
76
|
+
required: false,
|
|
77
|
+
},
|
|
78
|
+
firstFileDate: {
|
|
79
|
+
type: Date,
|
|
80
|
+
},
|
|
81
|
+
firstFile: {
|
|
82
|
+
type: Boolean,
|
|
83
|
+
},
|
|
84
|
+
status: {
|
|
85
|
+
type: Boolean,
|
|
86
|
+
},
|
|
87
|
+
timeDownload: {
|
|
88
|
+
type: Date,
|
|
89
|
+
},
|
|
90
|
+
hibernet: {
|
|
91
|
+
type: Object,
|
|
92
|
+
},
|
|
93
|
+
appVersion: {
|
|
94
|
+
type: String,
|
|
95
|
+
trim: true,
|
|
96
|
+
},
|
|
97
|
+
architecture: {
|
|
98
|
+
type: String,
|
|
99
|
+
trim: true,
|
|
100
|
+
enum: [ 'x32', 'x64' ],
|
|
101
|
+
},
|
|
102
|
+
updateAppVersion: {
|
|
103
|
+
type: String,
|
|
104
|
+
trim: true,
|
|
105
|
+
},
|
|
106
|
+
triggerProcessId: {
|
|
107
|
+
type: String,
|
|
108
|
+
},
|
|
109
|
+
isRestartRequired: {
|
|
110
|
+
type: Boolean,
|
|
111
|
+
},
|
|
112
|
+
serverType: {
|
|
113
|
+
type: Boolean,
|
|
114
|
+
},
|
|
115
|
+
deleteInterval: {
|
|
116
|
+
type: Number,
|
|
117
|
+
},
|
|
118
|
+
timeElapsed: {
|
|
119
|
+
type: Number,
|
|
120
|
+
trim: true,
|
|
121
|
+
},
|
|
122
|
+
lastLoginAt: {
|
|
123
|
+
type: Date,
|
|
124
|
+
},
|
|
125
|
+
macId: {
|
|
126
|
+
type: String,
|
|
127
|
+
trim: true,
|
|
128
|
+
},
|
|
129
|
+
handShake: {
|
|
130
|
+
type: Boolean,
|
|
131
|
+
},
|
|
132
|
+
speedTest: {
|
|
133
|
+
type: Object,
|
|
134
|
+
},
|
|
135
|
+
dataUpload: {
|
|
136
|
+
type: Object,
|
|
137
|
+
},
|
|
138
|
+
preRequisiteStartedAt: {
|
|
139
|
+
type: Date,
|
|
140
|
+
},
|
|
141
|
+
preRequisite: {
|
|
142
|
+
type: Boolean,
|
|
143
|
+
},
|
|
144
|
+
deviceSpec: {
|
|
145
|
+
type: Object,
|
|
146
|
+
},
|
|
147
|
+
systemUtil: {
|
|
148
|
+
type: Object,
|
|
149
|
+
},
|
|
150
|
+
camCred: {
|
|
151
|
+
type: Object,
|
|
152
|
+
},
|
|
153
|
+
deleteExe: {
|
|
154
|
+
type: Boolean,
|
|
155
|
+
},
|
|
73
156
|
camDetails: {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
157
|
+
type: Array,
|
|
158
|
+
},
|
|
159
|
+
secertKey: {
|
|
160
|
+
type: String,
|
|
161
|
+
trim: true,
|
|
162
|
+
},
|
|
163
|
+
ipListStatus: {
|
|
164
|
+
type: Boolean,
|
|
165
|
+
},
|
|
166
|
+
ipManufacturerStatus: {
|
|
167
|
+
type: Boolean,
|
|
168
|
+
},
|
|
169
|
+
frameRTSP: {
|
|
170
|
+
type: Boolean,
|
|
171
|
+
},
|
|
172
|
+
installEdge: {
|
|
173
|
+
type: Boolean,
|
|
174
|
+
},
|
|
175
|
+
systemTimeZone: {
|
|
176
|
+
type: String,
|
|
177
|
+
},
|
|
178
|
+
configurationStage: {
|
|
179
|
+
type: String,
|
|
77
180
|
},
|
|
78
181
|
},
|
|
79
182
|
spocDetails: [
|