import { BaseModelFilter } from '../../src/BaseModel' ; export default class TestModelFilter extends BaseModelFilter { public static blacklist : string [ ] = [ 'email' , 'password' ] ; public username ( username ) { this . $query . where ( 'username' , 'LIKE' , `%${ username }%` ) ; } public email ( email ) { this . $query . where ( 'email' , 'LIKE' , `%${ email }%` ) ; } public company ( id ) { this . $query . where ( 'company_id' , + id ) ; } public companyId ( id ) { this . $query . where ( 'company_id' , + id ) ; } public isAdmin ( flag ) { this . $query . where ( 'is_admin' , flag ) ; } public title ( value ) { this . $query . where ( 'title' , 'LIKE' , `%${ value }%` ) ; } public text ( value ) { this . $query . where ( 'text' , 'LIKE' , `%${ value }%` ) ; } public mobilePhone ( value ) { console . log ( value ) ; } }