27 lines
492 B
JavaScript
27 lines
492 B
JavaScript
"use strict";
|
|
|
|
const mongoose = require('mongoose');
|
|
const Schema = mongoose.Schema;
|
|
|
|
const LogRespawnSchema = new Schema({
|
|
war: {
|
|
type: mongoose.Schema.Types.ObjectId,
|
|
ref: 'War',
|
|
required: true
|
|
},
|
|
time: {
|
|
type: Number,
|
|
required: true
|
|
},
|
|
player: {
|
|
type: String,
|
|
required: true
|
|
}
|
|
}, {
|
|
collection: 'logRespawn'
|
|
});
|
|
// optional more indices
|
|
LogRespawnSchema.index({war: 1, player: 1});
|
|
|
|
module.exports = mongoose.model('LogRespawn', LogRespawnSchema);
|