@ -14,7 +14,7 @@ module.exports = (connection) => connection.model('series', new Schema({
completed : { type : Boolean , default : false } , //SUBMISSION completed
completed : { type : Boolean , default : false } , //SUBMISSION completed
approved : { type : Schema . Types . Mixed , default : false } , //boolean or {approved: Boolean, by: <uid>}
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
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 : [ {
reviewFlags : { type : [ {
by : String ,
by : String ,
reason : String ,
reason : String ,
@ -24,28 +24,28 @@ module.exports = (connection) => connection.model('series', new Schema({
name : { type : String , required : true , maxLength : 150 } , //!REQ
name : { type : String , required : true , maxLength : 150 } , //!REQ
romaji : { type : String , required : true , maxLength : 150 } , //!REQ
romaji : { type : String , required : true , maxLength : 150 } , //!REQ
kanji : { type : String , maxLength : 150 , default : null } ,
kanji : { type : String , maxLength : 150 , default : null } ,
altNames : { type : [ String ] , default : [ ] } ,
altNames : { type : [ { type : String , maxLength : 150 } ] , default : [ ] } ,
synopsis : { type : {
synopsis : { type : {
synopsis : { type : String , required : true , maxLength : 1000 } ,
synopsis : { type : String , required : true , maxLength : 1000 } ,
by : String //uid
by : String //uid
} , required : true } , //if not present, use "Synopsis not available yet" //!REQ
} , 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
//TODO database for genres or cache
tags : { default : [ ] , type : [ String ] } ,
tags : { default : [ ] , type : [ { type : String , maxLength : 25 } ] } ,
nsfw : { type : Boolean , default : false } ,
nsfw : { type : Boolean , default : false } ,
nsfwReason : { type : String , default : null } , //gore, language, nudity, strong themes
nsfwReason : { type : String , default : null } , //gore, language, nudity, strong themes
completed : { type : Boolean , default : false } , //SERIES completed
completed : { type : Boolean , default : false } , //SERIES completed
streamAt : { type : [ String ] , default : [ ] } ,
streamAt : { type : [ { type : String , maxLength : 25 } ] , default : [ ] } ,
publishers : { type : [ String ] , default : [ ] } ,
publishers : { type : [ { type : String , maxLength : 50 } ] , default : [ ] } ,
studios : { type : [ String ] , default : [ ] } ,
studios : { type : [ { type : String , maxLength : 50 } ] , default : [ ] } ,
air : {
air : {
from : { type : String , default : null } , //absence of start date means anime is confirmed but not released //TODO special handling for unstarted series
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
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.
videos : { type : Object , default : { } } , //OPs, EDs, trailers, etc.
art : {
art : {
@ -72,7 +72,7 @@ module.exports = (connection) => connection.model('series', new Schema({
soundtrack : Number ,
soundtrack : Number ,
animation : Number
animation : Number
} ,
} ,
comments : String
comments : { type : String , maxLength : 2000 }
} ] , default : [ ] } ,
} ] , default : [ ] } ,
/ * *
/ * *