Class: Asset#

Describes a single digital asset that has been stored on a remote storage provider.

author Jean-Philippe Steinmetz info@acceleratxr.com

Hierarchy#

Index#

Constructors#

Properties#

Accessors#

Constructors#

constructor#

+ new Asset(other?: any): Asset

Overrides EntityBase.constructor

Defined in src/models/Asset.ts:47

Parameters:#

Name

Type

other?

any

Returns: Asset

Properties#

checksum#

checksum: string = “”

Defined in src/models/Asset.ts:17

The checksum of the asset’s contents. The value is of the form <alg>:<hash> where <alg> is the hash algorithm used and <hash> is the value of the asset’s checksum. e.g. sha512:f03298r0982309r8320r8028f3oajfoiqiuf093q2uf908u2fjqfa980yu9 represents a SHA512 hash with value f03298r0982309r8320r8028f3oajfoiqiuf093q2uf908u2fjqfa980yu9.


dateCreated#

dateCreated: Date = new Date()

Inherited from EntityBase.dateCreated

Defined in src/EntityBase.ts:18

The date and time that the object was created.


dateModified#

dateModified: Date = new Date()

Inherited from EntityBase.dateModified

Defined in src/EntityBase.ts:23

The date and time that the object was last modified.


metadata#

metadata: any = undefined

Defined in src/models/Asset.ts:22

An map of key-value pairs containing additional metadata about the asset.


mimetype#

mimetype: string = “”

Defined in src/models/Asset.ts:27

The type of data that the asset contains.


name#

name: string = “”

Defined in src/models/Asset.ts:32

The unique name of the asset.


ownerUid#

ownerUid: string = “”

Defined in src/models/Asset.ts:37

The universally unique identifier of the user that owns the asset.


size#

size: number = 0

Defined in src/models/Asset.ts:42

The total size of the asset in bytes.


uid#

uid: string = uuid.v4()

Inherited from EntityBase.uid

Defined in src/EntityBase.ts:13

The universally unique identifier of the object.


url#

url: string = “”

Defined in src/models/Asset.ts:47

The universal resource location of the asset. e.g. it’s location on the Internet or local filesystem.


version#

version: number = 0

Inherited from EntityBase.version

Defined in src/EntityBase.ts:28

The optimistic locking version of the object.

Accessors#

ClassName#

Staticget ClassName(): string

Defined in src/models/Asset.ts:12

Returns: string