Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Fix some spelling mistakes #91

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ exports.sequelize = {
}
```

- Edit your own configurations in `conif/config.{env}.js`
- Edit your own configurations in `config/config.{env}.js`

```js
exports.sequelize = {
Expand Down Expand Up @@ -150,7 +150,7 @@ module.exports = app => {
});
}

// don't use arraw function
// don't use arrow function
User.prototype.logSignin = async function() {
return await this.update({ last_sign_in_at: new Date() });
}
Expand Down Expand Up @@ -197,7 +197,7 @@ exports.sequelize = {
// other sequelize configurations
},
{
delegate: 'admninModel', // load all models to app.adminModel and ctx.adminModel
delegate: 'adminModel', // load all models to app.adminModel and ctx.adminModel
baseDir: 'admin_model', // load models from `app/admin_model/*.js`
database: 'admin',
// other sequelize configurations
Expand Down Expand Up @@ -244,12 +244,12 @@ module.exports = app => {
};
```

If you define the same model for different datasource, the same model file will be excute twice for different database, so we can use the secound argument to get the sequelize instance:
If you define the same model for different datasource, the same model file will be execute twice for different database, so we can use the second argument to get the sequelize instance:

```js
// app/model/user.js
// if this file will load multiple times for different datasource
// we can use the secound argument to get the sequelize instance
// we can use the second argument to get the sequelize instance
module.exports = (app, model) => {
const { STRING, INTEGER, DATE } = app.Sequelize;

Expand All @@ -269,7 +269,7 @@ module.exports = (app, model) => {

### Customize Sequelize

By default, egg-sequelize will use sequelize@5, you can cusomize sequelize version by pass sequelize instance with `config.sequelize.Sequelize` like this:
By default, egg-sequelize will use sequelize@5, you can customize sequelize version by pass sequelize instance with `config.sequelize.Sequelize` like this:

```js
// config/config.default.js
Expand Down Expand Up @@ -350,7 +350,7 @@ module.exports = app => {

## Migration

Using [sequelize-cli](https://github.com/sequelize/cli) to help manage your database, data structures and seed data. Please read [Sequelize - Migrations](http://docs.sequelizejs.com/manual/tutorial/migrations.html) to learn more infomations.
Using [sequelize-cli](https://github.com/sequelize/cli) to help manage your database, data structures and seed data. Please read [Sequelize - Migrations](http://docs.sequelizejs.com/manual/tutorial/migrations.html) to learn more information.

## Recommended example

Expand Down