# Adonis-Mongoose-Model
> Fully Mongoose-Model integration, with mongodb connection

[![npm](https://img.shields.io/npm/v/adonis-mongoose-model.svg?style=flat-square)](https://www.npmjs.com/package/adonis-mongoose-model)
[![StyleCI](https://styleci.io/repos/114804179/shield?branch=dev)](https://styleci.io/repos/114804179)
[![Build Status](https://travis-ci.org/juampi92/adonis-mongoose-model.svg?branch=master&style=flat-square)](https://travis-ci.org/juampi92/adonis-mongoose-model)
[![npm](https://img.shields.io/npm/dm/adonis-mongoose-model.svg?style=flat-square)](https://www.npmjs.com/package/adonis-mongoose-model)

This package brings you a MongooseProvider that connects to the database, a Mongoose base Model, a mongoose serializer for AdonisAuth

<img src="http://res.cloudinary.com/adonisjs/image/upload/q_100/v1497112678/adonis-purple_pzkmzt.svg" width="200px" align="right" hspace="30px" vspace="50px">

## Features

1. Support for Mongoose model creation.
2. Strong BaseModel that's Hook compatible, indexable and easy es6 inheritance
3. Support for a Mongoose serializer.
4. Adonis command for creating mongoose models

## Installation
You can install the package from npm.
```bash
adonis install adonis-mongoose-model --yarn
```

Make sure to read [instructions.md](instructions.md) file.

## Adonis Target

This repo/branch is supposed to run on Adonis 4.x

## Node/OS Target

This repo/branch is supposed to run fine on all major OS platforms and targets `Node.js >=7.0`
