How to use the @nestjs/mongoose.InjectModel function in @nestjs/mongoose

To help you get started, we’ve selected a few @nestjs/mongoose examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github feater-dev / feater / server / src / persistence / repository / definition.repository.ts View on Github external
constructor(
        @InjectModel('Definition')
        private readonly definitionModel: Model,
    ) {}
github feater-dev / feater / api / src / persistence / repository / user.repository.ts View on Github external
constructor(
        @InjectModel(UserSchema) private readonly userModel: Model,
    ) {}
github feater-dev / feater / api / src / persistence / repository / build-definition.repository.ts View on Github external
constructor(
        @InjectModel(BuildDefinitionSchema) private readonly buildDefinitionModel: Model,
    ) {}
github vellengs / nestx-server / packages / base / src / controllers / users.service.ts View on Github external
constructor(
    @InjectModel("User")
    protected readonly model: Model,
    @InjectModel("Profile")
    protected readonly profileModel: Model,
    @InjectModel("VeryCode")
    private readonly veryCodeModel: Model
  ) {
    super(model);
  }
github vellengs / nestx / packages / servers / nestx-base / src / controllers / settings.service.ts View on Github external
constructor(
    @InjectModel("Setting") protected readonly model: Model
  ) {
    super(model);
  }
github joe307bad / points / API.Points / src / seed / seed.service.ts View on Github external
constructor(
        @InjectTypegoose(User) private readonly userModel: ModelType,
        @InjectModel('Achievement') private readonly achievementModel: Model,
        @InjectModel('Category') private readonly categoryModel: Model,
    ) { }
github vellengs / nestx / packages / servers / nest-server / src / mock / mock.service.ts View on Github external
constructor(
    @InjectModel('User')
    protected readonly model: Model,
  ) {
    this.install = new Installer(model.db);
  }
github Kibibit / achievibit / src / modules / repos / repos.service.ts View on Github external
  constructor(@InjectModel(REPO_MODEL_NAME) private readonly userModel: Model) { }
github marcomelilli / nestjs-email-authentication / src / auth / auth.service.ts View on Github external
  constructor(@InjectModel('User') private readonly userModel: Model, 
  @InjectModel('EmailVerification') private readonly emailVerificationModel: Model,
  @InjectModel('ForgottenPassword') private readonly forgottenPasswordModel: Model,
  @InjectModel('ConsentRegistry') private readonly consentRegistryModel: Model,
  private readonly jwtService: JWTService) {}
github abouroubi / nestjs-auth-jwt / src / user / user.service.ts View on Github external
constructor(
    @InjectModel(User.modelName) private readonly userModel: ModelType,
  ) {
    super();
    this._model = userModel;
  }