UNPKG

modpacksio-common

Version:

Common code for Modpacks.io services

32 lines (29 loc) 630 B
const Schema = require('mongoose').Schema; const platformVersion = new Schema({ _id: { type: String, alias: 'id' }, type: String, recommended: { type: Boolean, default: false }, latest: { type: Boolean, default: true, }, status: String, files: { json: String, client: String, server: String, universal: String } }); platformVersion.methods.toPublic = function () { const obj = this.toObject({ virtuals: true, versionKey: false }); delete obj._id; return obj; }; module.exports = platformVersion;