PrivateData

PrivateData

Represents private data attached to an entity in the database.

Constructor

# new PrivateData(options)

import PrivateData from "https://designftw.github.io/chat-lib/src/models/PrivateData.js";

PrivatePayload model constructor.

Parameters:
Name Type Description
options Object
Properties
Name Type Description
id string

see BaseModel's id property

createdAt Date

see BaseModel's createdAt property

updatedAt Date

see BaseModel's updatedAt property

entityId string

see PrivatePayload's entityId property

data Object

see PrivatePayload's data property

Members

# data :Object

The data associated with the private data.

Type:
  • Object

# entityId :string

The id of the object this data is attached to.

Type:
  • string

Methods

# toJSON() → {Object}

Convert this entity to a JSON object that could be fed to its constructor to create another object with the same data

Returns:
Type
Object