A layer is a group of fields that change together.
Each layer names one scope and one kind. It is the unit of a permission, an approval and a release, so the schema decides who changes what, and how.
| Kind of layer | What it holds |
|---|---|
| Released | Values that a run publishes, a person can review and a rollback restores. The default. |
| Dated | Values that hold over a period known in advance. A read returns the value at its instant. |
| Stated once | Documents that never change once stated. A correction is a record of its own. |
| Balances | Amounts that many runs add to at the same time. |
| Overlay | Values that another system writes live, with no review, no release and no rollback. |
Five kinds of layer
Choose a kind by how its values change, and by who changes them.
| A field can be | What it means |
|---|---|
| Checked | Required, a least and a greatest, a length, a pattern, allowed values. |
| Unique | No two records hold the same value. The engine rejects a change that reuses one. |
| Derived | Computed by an enricher, your code, at each change. |
| Restricted | Read and written only by the roles it names. It never enters search or events. |
| A reference | It names a record of another entity, and carries some of its fields with each read. |
| A file | An image or a document, with the renditions that the field declares. |
What a field declares
Every check runs on every change, at every scope where the record exists.