mangaReader/models/favorite.js

18 lines
500 B

const mongoose = require('mongoose');
const Schema = mongoose.Schema;
let favorite =
new Schema(
{
scanlator: {type: String, required: true, max: 100},
title: {type: String, required: true, max: 100},
link:{type: String, require:true, max:100},
tags:{type: Array, require:false}
}
);
const Favorite = module.exports = mongoose.model('favorite', favorite, 'mangareader');
module.exports.get = (callback, limit)=>
{
Favorite.find(callback).limit(limit);
}