Home Reference Source Repository
import Entity from 'tsugi-node/src/Entity.js'
public class | source

Entity

Direct Subclass:

User

This captures all of the data associated with the LTI Launch.

Constructor Summary

Public Constructor
public

All extending classes must define these member variables in their constructor

Member Summary

Public Members
public

Implementing classes must override this variable in their constructor

public

Implementing classes must override this variable in their constructor

public

Implementing classes must override this variable in their constructor

public get

json: string: *

Load the json field for this entity

public set

json(json: string): *

Set the JSON entry for this entity

Method Summary

Public Methods
public

setJsonKey(key: string, value: string)

Set/update a JSON key for this entity

Public Constructors

public constructor source

All extending classes must define these member variables in their constructor

Public Members

public PRIMARY_KEY: string source

Implementing classes must override this variable in their constructor

public TABLE_NAME: string source

Implementing classes must override this variable in their constructor

public id: number source

Implementing classes must override this variable in their constructor

public get json: string: * source

Load the json field for this entity

Return:

string

This returns the json string - it is not parsed - if there is nothing to return - this returns "false"

public set json(json: string): * source

Set the JSON entry for this entity

Public Methods

public setJsonKey(key: string, value: string) source

Set/update a JSON key for this entity

Params:

NameTypeAttributeDescription
key string

The key to be inserted/updated in the JSON

value string

The value to be inserted/updated in the JSON