UNPKG

chrobject

Version:

Stores chronicles of plain objects as diffs and snapshots

43 lines (42 loc) 1.01 kB
/** * Creator: Christian Hotz * Company: hydra newmedia GmbH * Date: 12.06.16 * * Copyright hydra newmedia GmbH */ /** * Imports */ import * as mongoose from 'mongoose'; import { Types } from 'mongoose'; import { IModel } from 'mongoose-repo'; import { Entry } from '../../../utils/Entry'; import { IDeepDiff } from '../../../utils/IDeepDiff'; export declare class EntryModel implements IModel<EntryDocument> { _id: Types.ObjectId; __v: number; metadata: { creator: { user: string; source: string; }; timestamp: string; objId: string; entity: string; linkId?: string; }; obj: Object | IDeepDiff[]; constructor(entry: Entry); calcMetadata(entry: Entry): { creator: { user: string; source: string; }; timestamp: string; objId: string; entity: string; }; } export interface EntryDocument extends mongoose.Document, EntryModel { }