const mongoose = require('mongoose');
const Schema = mongoose.Schema;

let user = 
new Schema(
    {
        username: {type: String, required: true, max: 100},
        hash: {type: String, required: true, max: 100}
    }
);

const User = module.exports = mongoose.model('favorite', user, 'mangareader');
module.exports.get = (callback, limit)=>
{
   User.find(callback).limit(limit); 
}