nestjs-crud-sequelize
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

Nestjs Sequelize Crud

NPM Version Package License NPM Downloads Coverage

# For npm 
npm install --save nestjs-crud-sequelize
 
# For yarn 
yarn add --save nestjs-crud-sequelize

Usage

import { Injectable } from '@nestjs/common';
import { InjectModel } from '@nestjs/sequelize';
 
// Importe crud service}
import { CrudService } from 'nestjs-crud-sequelize';
 
// Import your model
import { UserModel } from 'src/models/user';
 
@Injectable()
export class UserService extends CrudService<UserModel> {
   constructor(
      // Inject your model
      @InjectModel(UserModel)
      model: typeof UserModel,
   ) {
      // Set mode to crud service constructor !
      super(model);
   }
}

⭐ Support for

nestjs-crud-sequelize is an open source project licensed by MIT. You can grow thanks to the sponsors and the support of the amazing sponsors. If you want to join them, contact me here.

🎩 Stay in touch

Contributors

Thanks to the wonderful people who collaborate with me !

📜 License

nestjs-crud-sequelize under License MIT.

Dependents (0)

Package Sidebar

Install

npm i nestjs-crud-sequelize

Weekly Downloads

85

Version

1.0.2

License

MIT

Unpacked Size

6.88 kB

Total Files

4

Last publish

Collaborators

  • yonicb
  • yonicalsin