chrobject
Version:
Stores chronicles of plain objects as diffs and snapshots
30 lines (29 loc) • 939 B
JavaScript
/**
* Creator: Christian Hotz
* Company: hydra newmedia GmbH
* Date: 12.06.16
*
* Copyright hydra newmedia GmbH
*/
;
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
/**
* Imports
*/
var mongoose = require('mongoose');
var SnapshotSchema_1 = require('./SnapshotSchema');
var EntryModel_1 = require('./EntryModel');
var SnapshotModel = (function (_super) {
__extends(SnapshotModel, _super);
function SnapshotModel(snapshot) {
_super.call(this, snapshot);
}
return SnapshotModel;
}(EntryModel_1.EntryModel));
exports.SnapshotModel = SnapshotModel;
var schema = new SnapshotSchema_1.SnapshotSchema();
exports.SnapshotCollection = mongoose.model(schema.getName(), schema.getSchema());