nestjs-crud-sequelize
v1.0.2
Published
Crud for sequelize
Downloads
164
Readme
Nestjs Sequelize Crud
# 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
- Github @yonycalsin
- Twitter @yonycalsin
- Instagram @yony_calsin
- Medium @yonycalsin
- Dev @yonycalsin
Contributors
Thanks to the wonderful people who collaborate with me !
📜 License
nestjs-crud-sequelize
under License MIT.