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
