# adonis-mongo-audit

> Audit AdonisJS models with mongodb

Latest version **1.0.1** (published 2020-08-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install adonis-mongo-audit
pnpm add adonis-mongo-audit
yarn add adonis-mongo-audit
bun add adonis-mongo-audit
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2020-08-10 |
| First published | 2020-08-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 8.5 KB |
| Known vulnerabilities | 0 (+3 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Acidiney Dias |
| Maintainers | acidiney |
| Keywords | adonis, auditable, adonis-auditable |

## Links

- npm: https://www.npmjs.com/package/adonis-mongo-audit
- Repository: https://github.com/acidiney/adonis-audit-mongo
- Homepage: https://github.com/acidiney/adonis-audit-mongo#readme
- Issues: https://github.com/acidiney/adonis-audit-mongo/issues
- npm.io page: https://npm.io/package/adonis-mongo-audit

## Dependencies (2)

- [lodash](https://npm.io/package/lodash.md) ^4.17.4
- [mongoose](https://npm.io/package/mongoose.md) ^5.9.28

## Alternatives

- [@lexical/table](https://npm.io/package/@lexical/table.md) — 3.0M weekly downloads
- [mantine-datatable](https://npm.io/package/mantine-datatable.md) — 98.2K weekly downloads
- [react-native-collapsible-tab-view](https://npm.io/package/react-native-collapsible-tab-view.md) — 70.6K weekly downloads
- [@handsontable/vue3](https://npm.io/package/@handsontable/vue3.md) — 16.1K weekly downloads
- [vuewordcloud](https://npm.io/package/vuewordcloud.md) — 7.2K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2020-08-10
- 1.0.0 — 2020-08-10

## README

# adonis-audit
Audit models in AdonisJS

## DISCLAIMER

This is just a release for using it through NPM. Not claiming any rights over the original code developed.

## How to use

Install npm module:

```bash
$ adonis install adonis-mongo-audit
```

## Register provider

Once you have installed adonis-audit, make sure to register the provider inside `start/app.js` in order to make use of it.

```js
const providers = [
  'adonis-mongo-audit/providers/AuditProvider'
]
```

## Using the module:

Add the following to your model's `boot` method:

```js
class MyModel extends Model {
  static boot () {
    super.boot()
    this.addTrait('@provider:Auditable')
  }
}
```

This you can start using as follows:

```js
// create
const model = await MyModel.audit().create({name: 'John'})

// update
const model = MyModel.find(1)
await model.audit().update({name: 'Simon'})

// delete
const model = MyModel.find(1)
await model.audit().delete()
```

## Built With

* [AdonisJS](http://adonisjs.com) - The web framework used.

## Versioning

[SemVer](http://semver.org/) is used for versioning. For the versions available, see the [tags on this repository](https://github.com/simontong/adonis-auditable/tags).  

## Authors

* **Simon Tong** - *Developer* - [simontong](https://github.com/simontong)

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.


## Changelog
- v1.0.0
  - Initial release.

---
_Source: https://npm.io/package/adonis-mongo-audit · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
