UBModel

@unitybase/cs-shared.UBDomain~ UBModel

new UBModel(cfg, modelCode)

Model (logical group of entities). Instantiated in UBDomain.models and UBDomain.orderedModels
Arguments:
  1. cfg
    Properties
    1. path (string)
    2. needInit (boolean)
    3. needLocalize (boolean)
    4. order (number)
    5. version (string)
    6. [moduleName] (string)
    7. [moduleSuffix] (string)
    8. [clientRequirePath] (string)  if passed are used instead of moduleName + moduleSuffix
    9. [realPublicPath] (string)
  2. modelCode (string)

Members

clientRequirePath: string

The path for retrieve a model public accessible files (using clientRequire endpoint)

moduleName: string

Module name for require

name: string

Model name as specified in application config

needInit: boolean

initModel.js script is available in the public folder (should be injected by client)

needLocalize: boolean

locale-Lang.js script is available in the public folder (should be injected by client)

order: number

An order of model initialization (as it is provided in server domain config)

realPath: string

Server-side domain only - the full path to model folder

realPublicPath: string

Server-side domain only - the full path to model public folder (if any)

version: string

Model version as specified in version key of model package.json If package.json not found version is empty.

Introduced in ub server@5.4.2