Update schema docs

pull/51/head
HardiReady 2019-02-09 18:51:01 +01:00
parent de05260298
commit 7c23c302c6
3 changed files with 35 additions and 2 deletions

2
.gitignore vendored
View File

@ -46,7 +46,6 @@ Thumbs.db
# Internal Data # Internal Data
/public/ /public/
mongodb-data/
server/resource/ server/resource/
server/apib/dredd/data/tmp-resource server/apib/dredd/data/tmp-resource
backup/ backup/
@ -59,4 +58,3 @@ backup/
.cache/motd.legal-displayed .cache/motd.legal-displayed
.profile .profile
.ssh/ .ssh/

Binary file not shown.

View File

@ -0,0 +1,35 @@
'use strict';
const mongoose = require('mongoose');
const Schema = mongoose.Schema;
const LogServerFpsSchema = new Schema({
war: {
type: mongoose.Schema.Types.ObjectId,
ref: 'War',
required: true,
},
entityName: {
type: String,
required: true,
},
avgFps: [{
type: Number,
get: (v) => Math.round(v),
set: (v) => Math.round(v),
required: true,
}],
minFps: [{
type: Number,
get: (v) => Math.round(v),
set: (v) => Math.round(v),
required: true,
}],
}, {
collection: 'logServerFps',
versionKey: false
});
// optional more indices
LogServerFpsSchema.index({war: 1});
module.exports = mongoose.model('LogServerFpsSchema', LogServerFpsSchema);