File

src/app/core/entity/model/update-metadata.ts

Description

Object to store metadata about a "revision" of a document including date and author of the change.

Index

Properties

Constructor

constructor(by: string, at: Date)
Parameters :
Name Type Optional
by string No
at Date No

Properties

at
Type : Date
Decorators :
@DatabaseField()

when the update was saved to db

by
Type : string
Decorators :
@DatabaseField()

username who saved the update

Static DATA_TYPE
Type : string
Default value : "update-metadata"
import { DatabaseField } from "../database-field.decorator";

/**
 * Object to store metadata about a "revision" of a document including date and author of the change.
 */
export class UpdateMetadata {
  static DATA_TYPE = "update-metadata";

  /** when the update was saved to db */
  @DatabaseField() at: Date;

  /** username who saved the update */
  @DatabaseField() by: string;

  constructor(by: string = undefined, at: Date = new Date()) {
    this.by = by;
    this.at = at;
  }
}

results matching ""

    No results matching ""