import { Model } from "mongoose" ; import { Injectable } from "@nestjs/common" ; import { InjectModel } from "@nestjs/mongoose" ; import { MongooseService , ResultList } from "nestx-common" ; import { LogModel } from "./../interfaces" ; @ Injectable ( ) export class LogsService extends MongooseService < LogModel > { constructor ( @ InjectModel ( "Log" ) protected readonly model ) { super ( model ) ; } async querySearch ( keyword , page , size , sort ) { return super . query ( page , size , { } , { keyword , field : "name" } , this . defaultQueryFields , sort ) ; } }