@ -14,7 +14,7 @@ module.exports = (connection) => connection.model('series', new Schema({
completed : { type : Boolean , default : false } , //SUBMISSION completed
approved : { type : Schema . Types . Mixed , default : false } , //boolean or {approved: Boolean, by: <uid>}
submitted : Schema . Types . Mixed , //can be false or a string with the ID of the submitter, //!REQ
hidden : { type : Boolean , defua lt: false } ,
hidden : { type : Boolean , defau lt: false } ,
reviewFlags : { type : [ {
by : String ,
reason : String ,
@ -24,28 +24,28 @@ module.exports = (connection) => connection.model('series', new Schema({
name : { type : String , required : true , maxLength : 150 } , //!REQ
romaji : { type : String , required : true , maxLength : 150 } , //!REQ
kanji : { type : String , maxLength : 150 , default : null } ,
altNames : { type : [ String ] , default : [ ] } ,
altNames : { type : [ { type : String , maxLength : 150 } ] , default : [ ] } ,
synopsis : { type : {
synopsis : { type : String , required : true , maxLength : 1000 } ,
by : String //uid
} , required : true } , //if not present, use "Synopsis not available yet" //!REQ
genres : { type : [ String ] , required : true } , //!REQ
genres : { type : [ { type : String , maxLength : 25 } ] , required : true } , //!REQ
//TODO database for genres or cache
tags : { default : [ ] , type : [ String ] } ,
tags : { default : [ ] , type : [ { type : String , maxLength : 25 } ] } ,
nsfw : { type : Boolean , default : false } ,
nsfwReason : { type : String , default : null } , //gore, language, nudity, strong themes
completed : { type : Boolean , default : false } , //SERIES completed
streamAt : { type : [ String ] , default : [ ] } ,
publishers : { type : [ String ] , default : [ ] } ,
studios : { type : [ String ] , default : [ ] } ,
streamAt : { type : [ { type : String , maxLength : 25 } ] , default : [ ] } ,
publishers : { type : [ { type : String , maxLength : 50 } ] , default : [ ] } ,
studios : { type : [ { type : String , maxLength : 50 } ] , default : [ ] } ,
air : {
from : { type : String , default : null } , //absence of start date means anime is confirmed but not released //TODO special handling for unstarted series
to : { type : String , defua lt: null } //null indicates still airing; completed: true + non-null "to" value means series is waiting on another season
to : { type : String , defau lt: null } //null indicates still airing; completed: true + non-null "to" value means series is waiting on another season
} ,
externalLinks : { type : Object , default : { } } , //streaming services, other databases, etc. //TODO externalLinks
officialSite : { type : String , defua lt: null } ,
officialSite : { type : String , defau lt: null } ,
videos : { type : Object , default : { } } , //OPs, EDs, trailers, etc.
art : {
@ -72,7 +72,7 @@ module.exports = (connection) => connection.model('series', new Schema({
soundtrack : Number ,
animation : Number
} ,
comments : String
comments : { type : String , maxLength : 2000 }
} ] , default : [ ] } ,
/ * *