UNPKG

@mountyco/mongoose-wayback

Version:
21 lines 827 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var mongoose_1 = require("mongoose"); exports.WaybackSchema = new mongoose_1.Schema({ entityName: { type: String, required: true }, entityId: { type: String, required: true }, action: { type: String, required: true }, old: { type: {}, required: true }, new: { type: {}, required: true }, user: { type: {}, required: true } }, { timestamps: true }); var Wayback; exports.Wayback = Wayback; if (!process.env.MONGOOSE_WAYBACK_CONNECTION_URL) { exports.Wayback = Wayback = mongoose_1.model("Wayback", exports.WaybackSchema); } else { exports.Wayback = Wayback = mongoose_1.createConnection(process.env.MONGOOSE_WAYBACK_CONNECTION_URL). model("Wayback", exports.WaybackSchema); } //# sourceMappingURL=wayback.js.map