mirror of
https://github.com/openmhz/trunk-server.git
synced 2026-11-10 07:47:29 -05:00
30 lines
596 B
JavaScript
30 lines
596 B
JavaScript
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);
|