2016-10-17 23:22:28 +00:00
|
|
|
"use strict";
|
|
|
|
|
|
|
|
/**
|
|
|
|
* BruteForce schema
|
|
|
|
*
|
|
|
|
* @type {<Mongoose.Schema>}
|
|
|
|
*/
|
2016-11-21 01:09:50 +00:00
|
|
|
var bruteForceSchema = Mongoose.Schema({
|
2016-10-17 23:22:28 +00:00
|
|
|
_id: { type: String, index: 1 },
|
|
|
|
data: {
|
|
|
|
count: Number,
|
|
|
|
lastRequest: Date,
|
|
|
|
firstRequest: Date
|
|
|
|
},
|
|
|
|
expires: { type: Date, index: { expires: '1d' } }
|
|
|
|
});
|
|
|
|
|
2016-11-21 01:09:50 +00:00
|
|
|
module.exports = Mongoose.model('Bruteforce', bruteForceSchema);
|