You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
613 B
20 lines
613 B
const mongoose = require('mongoose');
|
|
const Schema = mongoose.Schema;
|
|
|
|
let chapter =
|
|
new Schema(
|
|
{
|
|
scanlator: {type: String, required: true, max: 100},
|
|
title: {type: String, required: true, max: 100},
|
|
link:{type: String, require:true, max:100},
|
|
chapterNum:{type: Number, require:true},
|
|
lastImageRead:{type:String, required:false},
|
|
completely:{type:Boolean, required:false}
|
|
}
|
|
);
|
|
|
|
const Chapter = module.exports = mongoose.model('chapter', chapter, 'mangareaderchapters');
|
|
module.exports.get = (callback, limit)=>
|
|
{
|
|
Chapter.find(callback).limit(limit);
|
|
} |