mirror of
https://github.com/openmhz/trunk-server.git
synced 2026-11-12 08:47:40 -05:00
switched everything over to Mongoose
This commit is contained in:
27
backend/models/system_stat.js
Normal file
27
backend/models/system_stat.js
Normal file
@@ -0,0 +1,27 @@
|
||||
var mongoose = require('mongoose');
|
||||
|
||||
let decodeErrorSchema = mongoose.Schema({
|
||||
errorHistory: [Number],
|
||||
spikeHistory: [Number],
|
||||
})
|
||||
|
||||
let talkgroupStatsSchema = mongoose.Schema({
|
||||
callCountHistory: [Number],
|
||||
callAvgLenHistory: [Number]
|
||||
})
|
||||
var systemStatSchema = mongoose.Schema({
|
||||
callTotals: [Number],
|
||||
uploadErrors: [Number],
|
||||
decodeErrorsFreq: {
|
||||
type: Map,
|
||||
of: decodeErrorSchema
|
||||
},
|
||||
talkgroupStats: {
|
||||
type: Map,
|
||||
of: talkgroupStatsSchema
|
||||
},
|
||||
shortName: String
|
||||
}, { collection: 'system_stats' });
|
||||
|
||||
|
||||
module.exports = mongoose.model('SystemStat', systemStatSchema);
|
||||
Reference in New Issue
Block a user