chrobject
Version:
Stores chronicles of plain objects as diffs and snapshots
38 lines (37 loc) • 889 B
JavaScript
/**
* Creator: Christian Hotz
* Company: hydra newmedia GmbH
* Date: 12.06.16
*
* Copyright hydra newmedia GmbH
*/
;
/**
* Imports
*/
var mongoose_1 = require('mongoose');
var SnapshotSchema = (function () {
function SnapshotSchema() {
this.name = 'ChrobjectSnapshot';
this.schema = new mongoose_1.Schema({
metadata: {
creator: {
user: String,
source: String
},
timestamp: Date,
objId: String,
entity: String
},
obj: {}
});
}
SnapshotSchema.prototype.getName = function () {
return this.name;
};
SnapshotSchema.prototype.getSchema = function () {
return this.schema;
};
return SnapshotSchema;
}());
exports.SnapshotSchema = SnapshotSchema;