tango-api-schema 2.0.30 → 2.0.32
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/authentication.model.js +1 -1
- package/schema/camera.model.js +110 -111
package/package.json
CHANGED
package/schema/camera.model.js
CHANGED
|
@@ -1,119 +1,118 @@
|
|
|
1
|
-
import { Schema, model } from
|
|
1
|
+
import { Schema, model } from "mongoose";
|
|
2
|
+
import mongooseUniqueValidator from "mongoose-unique-validator";
|
|
2
3
|
|
|
3
4
|
const collection = new Schema(
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
type: Date,
|
|
85
|
-
default: Date.now,
|
|
86
|
-
},
|
|
87
|
-
macId: {
|
|
5
|
+
{
|
|
6
|
+
storeId: {
|
|
7
|
+
type: String,
|
|
8
|
+
trim: true,
|
|
9
|
+
},
|
|
10
|
+
masterServer: {
|
|
11
|
+
type: String,
|
|
12
|
+
trim: true,
|
|
13
|
+
},
|
|
14
|
+
clientId: {
|
|
15
|
+
type: String,
|
|
16
|
+
trim: true,
|
|
17
|
+
},
|
|
18
|
+
ip: {
|
|
19
|
+
type: String,
|
|
20
|
+
trim: true,
|
|
21
|
+
},
|
|
22
|
+
manufacture: {
|
|
23
|
+
type: String,
|
|
24
|
+
trim: true,
|
|
25
|
+
},
|
|
26
|
+
camNumber: {
|
|
27
|
+
type: String,
|
|
28
|
+
trim: true,
|
|
29
|
+
},
|
|
30
|
+
username: {
|
|
31
|
+
type: String,
|
|
32
|
+
trim: true,
|
|
33
|
+
},
|
|
34
|
+
password: {
|
|
35
|
+
type: String,
|
|
36
|
+
trim: true,
|
|
37
|
+
},
|
|
38
|
+
subType: {
|
|
39
|
+
type: String,
|
|
40
|
+
trim: true,
|
|
41
|
+
},
|
|
42
|
+
RTSP: {
|
|
43
|
+
type: String,
|
|
44
|
+
trim: true,
|
|
45
|
+
},
|
|
46
|
+
retentionPeriod: {
|
|
47
|
+
type: Number,
|
|
48
|
+
},
|
|
49
|
+
streamName: {
|
|
50
|
+
type: String,
|
|
51
|
+
trim: true,
|
|
52
|
+
unique: true,
|
|
53
|
+
},
|
|
54
|
+
thumbnailImage: {
|
|
55
|
+
type: String,
|
|
56
|
+
trim: true,
|
|
57
|
+
},
|
|
58
|
+
status: {
|
|
59
|
+
type: String,
|
|
60
|
+
trim: true,
|
|
61
|
+
},
|
|
62
|
+
isActivated: {
|
|
63
|
+
type: Boolean,
|
|
64
|
+
},
|
|
65
|
+
isUp: {
|
|
66
|
+
type: Boolean,
|
|
67
|
+
},
|
|
68
|
+
captureAt: {
|
|
69
|
+
type: Date,
|
|
70
|
+
default: Date.now,
|
|
71
|
+
},
|
|
72
|
+
macId: {
|
|
73
|
+
type: String,
|
|
74
|
+
},
|
|
75
|
+
timeElapsed: {
|
|
76
|
+
type: Number,
|
|
77
|
+
default: 13,
|
|
78
|
+
},
|
|
79
|
+
camName: {
|
|
80
|
+
type: String,
|
|
81
|
+
trim: true,
|
|
82
|
+
},
|
|
83
|
+
filters: {
|
|
84
|
+
yolo: {
|
|
88
85
|
type: String,
|
|
86
|
+
default: true,
|
|
89
87
|
},
|
|
90
|
-
|
|
91
|
-
type: Number,
|
|
92
|
-
default: 13,
|
|
93
|
-
},
|
|
94
|
-
dataProcess: {
|
|
95
|
-
type: Boolean,
|
|
96
|
-
default: false,
|
|
97
|
-
},
|
|
98
|
-
camName: {
|
|
88
|
+
yoloProcess: {
|
|
99
89
|
type: String,
|
|
100
|
-
|
|
101
|
-
},
|
|
102
|
-
filters: {
|
|
103
|
-
yolo: {
|
|
104
|
-
type: String,
|
|
105
|
-
default: true
|
|
106
|
-
},
|
|
107
|
-
yoloProcess: {
|
|
108
|
-
type: String,
|
|
109
|
-
default: 10
|
|
110
|
-
}
|
|
90
|
+
default: 10,
|
|
111
91
|
},
|
|
112
92
|
},
|
|
113
|
-
{
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
93
|
+
productModule: {
|
|
94
|
+
type: Array,
|
|
95
|
+
},
|
|
96
|
+
IsVideoStream: {
|
|
97
|
+
type: Boolean,
|
|
98
|
+
default: false,
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
strict: true,
|
|
103
|
+
versionKey: false,
|
|
104
|
+
timestamps: true,
|
|
105
|
+
}
|
|
106
|
+
);
|
|
107
|
+
|
|
108
|
+
collection.index({
|
|
109
|
+
storeId: 1,
|
|
110
|
+
clientId: 1,
|
|
111
|
+
streamName: 1,
|
|
112
|
+
isActivated: 1,
|
|
113
|
+
isUp: 1,
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
collection.plugin(mongooseUniqueValidator);
|
|
118
117
|
|
|
119
|
-
export default model(
|
|
118
|
+
export default model("camera", collection);
|