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