BaseItem

documents. BaseItem

The base Item model definition which defines common behavior of an Item document between both client and server.

Constructor

new BaseItem()

Properties:
Name Type Description
data data.ItemData

The constructed data object for the document.

Extends

  • Document

Members

(static) metadata

(static) schema

effects

A reference to the Collection of ActiveEffect instances in the Item document, indexed by _id.

Methods

canUserModify()

migrateSystemData(options) → {object}

See:
  • mergeObject

Migrate the system data object to conform to data model defined by the current system version.

Parameters:
Name Type Description
options object

Options which customize how the system data is migrated.

Properties
Name Type Description
insertKeys boolean

Retain keys which exist in the current data, but not the model

insertValues boolean

Retain inner-object values which exist in the current data, but not the model

enforceTypes boolean

Require that data types match the model exactly to be retained

Returns:

The migrated system data object, not yet saved to the database

Type
object

testUserPermission()