UBModel

@unitybase/base/UBDomain~ UBModel

new UBModel(cfg, modelCode)

Model (logical group of entities)
Arguments:
  1. cfg
    Properties
    1. path
    2. needInit
    3. needLocalize
    4. order
    5. [moduleName] (string)
    6. [moduleSuffix] (string)
    7. [clientRequirePath] (string)  if passed are used instead of moduleName + moduleSuffix
    8. [realPublicPath] (string)
  2. modelCode (string)

Members

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)

moduleName

Module name for require

clientRequirePath: string

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

realPublicPath: string

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