Files
lib/src/orm/model/scope/ActiveScope.ts

12 lines
295 B
TypeScript
Raw Normal View History

import {Scope} from './Scope'
import {AbstractBuilder} from '../../builder/AbstractBuilder'
/**
* A basic scope to limit results where `active` = true.
*/
export class ActiveScope extends Scope {
apply(query: AbstractBuilder<any>): void {
query.where('active', '=', true)
}
}