Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save danieltanfh95/c4776fa4724318c18dd53584e2e031aa to your computer and use it in GitHub Desktop.
Save danieltanfh95/c4776fa4724318c18dd53584e2e031aa to your computer and use it in GitHub Desktop.
schema.pageSchema=new mongoose.Schema({
timestamp:Date,
hash:String,
text:String,
user_id:Number
});
schema.chapterSchema=new mongoose.Schema({
title:String,
page:[schema.pageSchema],
linktype:String,
link:String,
licensed:Boolean
});
schema.bookSchema=new mongoose.Schema({
title:String,
chapters:[schema.chapterSchema],
cover:String,
synopsis:String,
licensed:Boolean
});
schema.sectionSchema=new mongoose.Schema({
title:String,
language:String,
author:String,
artist:String,
publisher:String,
books:[schema.bookSchema]
})
schema.projectSchema=new mongoose.Schema({
title:String,
sections:[schema.sectionSchema],
status:String,
fully_translated:Boolean,
licensed:Boolean,
type:String,
alt_title:String,
synopsis:String,
cover:String,
categories:[String],
one_off:Boolean
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment