@lotics/cli 0.321.82 → 0.321.83
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/cli.js +16 -11
- package/docs/data_model.md +18 -0
- package/package.json +1 -1
package/docs/data_model.md
CHANGED
|
@@ -91,6 +91,24 @@ Anything that imports, reconciles or de-duplicates has to decide identity, and w
|
|
|
91
91
|
comparing displayed text — which is how one company arrives three times under three spellings. Name the key: a reference
|
|
92
92
|
number, a tax id, a link plus a period. Then match on record ids and option aliases, never on rendered labels.
|
|
93
93
|
|
|
94
|
+
## Rows that belong together by their VALUES are linked by a rule
|
|
95
|
+
|
|
96
|
+
A row that belongs to another by what it holds states a link the platform fills (`reference/link`, `fill`): a lesson to
|
|
97
|
+
its teacher's month, a reading to the price in force on its day, a line arriving with a code to the row that code names.
|
|
98
|
+
The link's `options_where` reads the row's own fields as `{ "$expr": "record.<field>" }`, and the platform keeps the link
|
|
99
|
+
as either row changes:
|
|
100
|
+
|
|
101
|
+
```json
|
|
102
|
+
"month": { "type": "link", "label": "Month", "table": "teacher_months", "multi": false, "pair": "lessons", "fill": true,
|
|
103
|
+
"options_where": { "node_type": "group", "logic": "and", "children": [
|
|
104
|
+
{ "node_type": "condition", "field_key": "teacher", "operator": "has_any_of", "value": { "$expr": "record.teacher" } },
|
|
105
|
+
{ "node_type": "condition", "field_key": "month", "operator": "on", "value": { "$expr": "record.starts_at" } } ] } }
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
A rollup through the `pair` sums the lessons on the month's row as they are written, a lookup reads the row a lesson
|
|
109
|
+
names, and the month's page lists its lessons. A workflow that reads the rows and copies a sum is stale between runs.
|
|
110
|
+
Making the month's rows, and freezing one when it closes, stay acts.
|
|
111
|
+
|
|
94
112
|
## A stage's moment is a date on the row
|
|
95
113
|
|
|
96
114
|
Who changed what, and when, is the platform's audit trail, which an agent already reads (`query_audit_logs`) under
|