DB API Reads
This commit is contained in:
11
app/models/scopes/Valid.scope.js
Normal file
11
app/models/scopes/Valid.scope.js
Normal file
@@ -0,0 +1,11 @@
|
||||
const Scope = require('flitter-orm/src/model/Scope')
|
||||
|
||||
class ValidScope extends Scope {
|
||||
async filter(to_filter) {
|
||||
return to_filter.equal('valid', true)
|
||||
.greater_than('expires', new Date)
|
||||
.less_than('issued', new Date)
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = exports = ValidScope
|
||||
Reference in New Issue
Block a user