README
LSK.js – db
@lskjs/db – LSK.js module for working with mongodb database
Table of contents
- ⌨️ Install
- Example of exntend
- 📖 License
- 👥 Contributors
- 👏 Contributing
- 📮 Any questions? Always welcome :)
⌨️ Install
# yarn
yarn i @lskjs/db @types/mongoose bluebird lodash
# npm
npm i @lskjs/db @types/mongoose bluebird lodash
основная фишка - UniversalSchema
Example of exntend
import BotsTelegramMessageModel from '@lskjs/bots/models/BotsTelegramMessageModel'
export default (...args) => {
const Schema = BotsTelegramMessageModel(...args);
Schema.extend({
status: {
type: String,
}
});
return Schema;
};
export default (...args) => {
const Schema = BotsTelegramMessageModel(...args);
Schema.schema = {
...Schema.schema,
status: {
type: String,
}
}
return Schema;
};
📖 License
This project is licensed under the MIT License - see the LICENSE file for details
👥 Contributors
Igor Suvorov 💻 🎨 🤔 |
👏 Contributing
- Fork it (https://github.com/yourname/yourproject/fork)
- Create your feature branch (
git checkout -b features/fooBar
) - Commit your changes (
git commit -am 'feat(image): Add some fooBar'
) - Push to the branch (
git push origin feature/fooBar
) - Create a new Pull Request