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.
CoreID/app/models/scopes/ActiveScope.js

14 lines
332 B

const { Scope } = require('flitter-orm')
/**
* A flitter-orm scope that enables soft-deletion by an active key.
* @extends {module:flitter-orm/src/model/Scope~Scope}
*/
class ActiveScope extends Scope {
async filter(to_filter) {
return to_filter.equal('active', true)
}
}
module.exports = exports = ActiveScope