ZuloOne
English
Sign in
Menu

Model — model

Updated

What it is#

A unit of delivery (module/localization): carries the layer (layerId), the version (modelVersion, semver), and explicit dependencies on other models. A model sees objects of lower layers and extends them additively, but never edits their lines. Exactly one model is Core (isSystem: true, layerId: 0) — it syncs only downward: edits to its files are rejected by export and overwritten back from the database (see By layers and models → System).

JSON envelope#

model.json at the root of the model folder, "kind": "Model" — the only place where the object row carries layerId (for all other metadata kinds, the layer is not author-owned; the core substitutes a copy from the model on save):

{
  "kind": "Model",
  "object": {
    "modelType": "Business",
    "description": "…",
    "isSystem": false,
    "isSealed": false,
    "isEnabled": true,
    "publisher": "ZuloOne",
    "modelVersion": "1.4.0",
    "metaId": "<GUID Model>",
    "name": "Inventory",
    "modelId": "00000000-0000-0000-0000-000000000000",
    "layerId": 2
  }
}

For the model itself, modelId is the all-zero sentinel (the model is its own root and has nothing to reference); for all other objects, modelId points to the metaId of THEIR model. Dependencies (dependencies, minVersion) are declared in the same file (see the zuloone-new-model skill).

C# base#

None — pure delivery data, not code.

Events / Chain of Command#

None. But the model version must be bumped in the same change as any edit to any of its objects: on tenant start, the tenant compares MetaPackages.PackageVersion with modelVersion; if they match, the model is not uploaded.

Example#

Core (layerId: 0, isSystem: true) and Common (layerId: 1) — two concrete examples in the tree by layers.

Was this page helpful?