API Docs for:
Show:

models.server.Chunk Class

Methods

createdAt

() Date

Inherited from models.BaseMixin but overwritten in models/BaseMixin.js:12

Returns:

Date:

deletedAt

() Date

Inherited from models.BaseMixin but overwritten in models/BaseMixin.js:36

Returns:

Date:

fetchOrCreate

(
  • identifier
)
Bluebird.Promise

Fetch or create a model uniquely identified by the columns defined in the identifier

Parameters:

  • identifier Object

    Object of table columns

Returns:

Bluebird.Promise:

with the model instance

hasVisibility

(
  • visibility
  • models
)

Visibility assertion helper

Parameters:

  • visibility String
  • models Array

    Array of models.server.Visibility models

Returns:

Boolean

isSame

(
  • other
)

Inherited from models.BaseMixin but overwritten in models/BaseMixin.js:48

Return true if the other object is built using the same constructor and they have the same id

Parameters:

Returns:

Boolean

isSoftDeleted

() Boolean

Inherited from models.BaseMixin but overwritten in models/BaseMixin.js:28

Returns:

Boolean:

softDelete

(
  • byUser
)
Bluebird.Promise

Set timestamp to deletedAt

Parameters:

Returns:

uniqueId

() String

Returns:

String:

updatedAt

() Date

Inherited from models.BaseMixin but overwritten in models/BaseMixin.js:20

Returns:

Date:

Properties

type

String

The database table name

Virtual database field. Use .get("type") to access it.

unique_id

String

Unique id between tables.

Virtual database field. Use .get("unique_id") to access it.