const path = require('path');
const model = require(path.resolve('src/model/pokemon'));

const dao = {

	create: function(pokemon) {
		return model.create(pokemon);
	},

	findOne: function(query) {
		query = query || {};
		return model.find({
			where: query
		});
	},

	findAll: function () {
		return model.findAll();
	}

};

module.exports = dao;
const path = require('path');
const model = require(path.resolve('src/model/pokemon'));

const dao = {

	create: function(pokemon) {
		return model.create(pokemon);
	},

	findOne: function(query) {
		query = query || {};
		return model.find({
			where: query
		});
	},

	findAll: function () {
		return model.findAll();
	},

	deleteOne: function(query) {
		return dao.destroy({where: query});
	}

};

module.exports = dao;
ADD delete method on DAO .
ADD delete method on DAO .
