mirror of https://github.com/requarks/wiki
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
395 B
21 lines
395 B
'use strict'
|
|
|
|
const Mongoose = require('mongoose')
|
|
|
|
/**
|
|
* BruteForce schema
|
|
*
|
|
* @type {<Mongoose.Schema>}
|
|
*/
|
|
var bruteForceSchema = Mongoose.Schema({
|
|
_id: { type: String, index: 1 },
|
|
data: {
|
|
count: Number,
|
|
lastRequest: Date,
|
|
firstRequest: Date
|
|
},
|
|
expires: { type: Date, index: { expires: '1d' } }
|
|
})
|
|
|
|
module.exports = Mongoose.model('Bruteforce', bruteForceSchema)
|