README
skyer-sequelize-component
Skyer sequelize component.
Install
$ npm i --save skyer-sequelize-component
Register
/app/components/sequelize.component.js
module.exports = require('skyer-sequelize-component');
Or
Register component by config/components.js file.
Usage
const sequelize = skyer.component.get('sequelize');
const UserModel = sequelize.model('User');
console.log(sequelize.isDefined('User'));
const user = yield UserModel.create({
name: 'jerry wu',
organization: 'skyer-team'
});
Options
See Sequelize
options
Example
See skyer-example