📅  最后修改于: 2022-03-11 14:57:45.857000             🧑  作者: Mango
class UserScopes extends SelectQueryBuilder {
get notDeleted(): UserScopes {
return this.andWhere("state != :state", {state: "deleted"});
}
}
@EntityRepository(User)
export class UserRepository extends Repository {
get scoped(): UserScopes {
return new UserScopes(this.createQueryBuilder("user"));
}
}