const {Schema} = require("mongoose"); module.exports = (connection) => connection.model('series', new Schema({ id: {type: String, unique: true}, meta: { locked: {type: Boolean, default: false}, creator: String, //uid edits: {type: [{ user: String, //uid timestamp: String, //Date.getTime(), action: String }], default: []}, completed: {type: Boolean, default: false}, approved: {type: { approved: Boolean, by: String }, default: false} }, name: String, romaji: String, kanji: String, altNames: [String], id: Number, synopsis: { synopsis: String, by: String }, genres: [String], tags: [String], }));