diff --git a/API.md b/API.md index e2b754c..872ebd3 100644 --- a/API.md +++ b/API.md @@ -34,7 +34,7 @@ The store is exposed as a `LibDashStore` instance (see `src/index.js`). Each met - **google_auth**: `id PK, email:s(320) UQ, picture?:s(2048), picturebinary?:bin, sub?:s(255) UQ, created_at:dt, selected_company?->company` - **language**: `id PK, iso639:s(10) UQ` - **ledger**: `id PK, manifestarticle_id->manifestarticle, transaction_type:s(100), amount:f, transaction_text:txt, hash_version:i, prev_hash?:s(128) [append-only]` -- **manifest**: `id PK, company_id->company, number:s(100), type:s(100), entity_id?->entity, external_number?:s(100), date:dt` +- **manifest**: `id PK, company_id->company, number:s(100), type:s(100), entity_id?->entity, external_number?:s(100), date:dt, created_at:dt` - **manifestarticle**: `id PK, manifest_id->manifest, sku?:s(100), name?:s(255), pu:f=1, amount:f, net:f, comment?:txt, rebate:f=0, taxrate:f=0` - **manifestattachment**: `id PK, manifest_id->manifest, file_id->file, sort:i=0, UQ(manifest_id, sort)` - **meta**: `key:s(255) PK, value:txt` diff --git a/API.numbers.md b/API.numbers.md index 85cdbcb..64d322f 100644 --- a/API.numbers.md +++ b/API.numbers.md @@ -6,7 +6,7 @@ This document is auto-generated from the JSDoc comments in `src/store` by runnin *Source: `src/store/numbers/list.js`* -Lists the number sequences of the user's selected company. +Lists the number sequences of the user's selected company. Ensures that default sequences ('sku', 'entity', 'delivery') exist. **Parameters** diff --git a/generate-api-doc.js b/generate-api-doc.js index b30d937..9f1c10d 100644 --- a/generate-api-doc.js +++ b/generate-api-doc.js @@ -336,7 +336,7 @@ const SCHEMA_TABLES = [ ['google_auth', 'id PK, email:s(320) UQ, picture?:s(2048), picturebinary?:bin, sub?:s(255) UQ, created_at:dt, selected_company?->company'], ['language', 'id PK, iso639:s(10) UQ'], ['ledger', 'id PK, manifestarticle_id->manifestarticle, transaction_type:s(100), amount:f, transaction_text:txt, hash_version:i, prev_hash?:s(128) [append-only]'], - ['manifest', 'id PK, company_id->company, number:s(100), type:s(100), entity_id?->entity, external_number?:s(100), date:dt'], + ['manifest', 'id PK, company_id->company, number:s(100), type:s(100), entity_id?->entity, external_number?:s(100), date:dt, created_at:dt'], ['manifestarticle', 'id PK, manifest_id->manifest, sku?:s(100), name?:s(255), pu:f=1, amount:f, net:f, comment?:txt, rebate:f=0, taxrate:f=0'], ['manifestattachment', 'id PK, manifest_id->manifest, file_id->file, sort:i=0, UQ(manifest_id, sort)'], ['meta', 'key:s(255) PK, value:txt'], diff --git a/generate-schema-graph.js b/generate-schema-graph.js index c5bc26f..dadb7a6 100644 --- a/generate-schema-graph.js +++ b/generate-schema-graph.js @@ -810,7 +810,7 @@ function buildDot(tables, edges, positions = null, anchors = null) { // mclimit bumps Graphviz's own crossing-minimization iterations. ` graph [rankdir=TB, splines=spline, overlap=false, bgcolor="${COLORS.background}",`, ' nodesep=0.95, ranksep=1.0, pad=0.5, fontname="Helvetica",', - ' compound=true, newrank=true, mclimit=4.0];', + ' compound=true, mclimit=4.0];', ' node [shape=plaintext, fontname="Helvetica"];', ' edge [fontname="Helvetica", fontsize=9, penwidth=1.4, arrowsize=0.7];', '', diff --git a/schema-graph.dot b/schema-graph.dot index 3c97457..2bba96b 100644 --- a/schema-graph.dot +++ b/schema-graph.dot @@ -1,7 +1,7 @@ digraph schema { graph [rankdir=TB, splines=spline, overlap=false, bgcolor="#1e2430", nodesep=0.95, ranksep=1.0, pad=0.5, fontname="Helvetica", - compound=true, newrank=true, mclimit=4.0]; + compound=true, mclimit=4.0]; node [shape=plaintext, fontname="Helvetica"]; edge [fontname="Helvetica", fontsize=9, penwidth=1.4, arrowsize=0.7]; @@ -11,15 +11,15 @@ digraph schema { fontcolor="#e2e8f0"; margin=14; meta [label=<
| meta | |||
| |||
| |||
| |||||||
| |||||||
| |||||||
| |||||||
| |||||||
| |||||||||||
| |||||||||||
| |||||||||||
| |||||||||||
| |||||||||||
| |||||||||||
| |||||||||||
| |||||||||||
| numbers | |||
| |||
| |||
| |||
| |||
| |||
| |||
| entityaddress | |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||||||||||
| |||||||||||
| |||||||||||
| |||||||||||
| |||||||||||
| |||||||||||
| |||||||||||
| |||||||||||
| |||||
| |||||
| |||||
| |||||
| entitycontact | |||
| |||
| |||
| |||
| |||
| |||
| |||||||||||||||||||||
| |||||||||||||||||||||
| |||||||||||||||||||||
| |||||||||||||||||||||
| |||||||||||||||||||||
| |||||||||||||||||||||
| |||||||||||||||||||||
| |||||||||||||||||||||
| |||||||||||||||||||||
| syncpos | |||
| |||
| |||
| |||
| |||
| entityhistory | |||
| |||
| |||
| |||
| |||
| |||
| companysetting | |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||||||||||||||||||||||
| |||||||||||||||||||||||
| |||||||||||||||||||||||
| |||||||||||||||||||||||
| |||||||||||||||||||||||
| |||||||||||||||||||||||
| |||||||||||||||||||||||
| |||||||||||||||||||||||
| |||||||||||||||||||||||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||||||||
| |||||||||
| |||||||||
| unittext | |||
| |||
| |||
| |||
| |||
| |||
| unittext | |||
| |||
| |||
| |||
| |||
| |||
| categorytext | |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| articletext | |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||||
| |||||
| categoryarticle | |||
| |||
| |||
| |||
| optionslistarticle | |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||||||||||||
| |||||||||||||
| |||||||||||||
| |||||||||||||
| categoryarticle | |||
| |||
| |||
| |||
| articlehistory | |||
| |||
| |||
| |||
| |||
| |||
| |||||||||||||||||||||
| |||||||||||||||||||||
| |||||||||||||||||||||
| |||||||||||||||||||||
| |||||||||||||||||||||
| |||||||||||||||||||||
| |||||||||||||||||||||
| |||||||||||||||||||||
| |||||||||||||||||||||
| |||||||||||||||||||||
| |||||||||||||||||||||
| |||||||||||||||||||||
| |||||||||||||||||||||
| |||||||||||||||||||||
| |||||
| |||||
| |||||||||||||||||||||
| |||||||||||||||||||||
| |||||||||||||||||||||
| |||||||||||||||||||||
| |||||||||||||||||||||
| |||||||||||||||||||||
| |||||||||||||||||||||
| |||||||||||||||||||||
| |||||||||||||||||||||
| |||||||||||||||||||||
| |||||||||||||||||||||
| |||||||||||||||||||||
| |||||||||||||||||||||
| |||||||||||||||||||||
| |||||||||||||||||||||
| articleean | |||
| |||
| |||
| |||
| articlesupplier | |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||||
| |||||
| articlelistarticle | |||
| |||
| |||
| |||
| |||
| |||
| |||||
| |||||
| optionslistarticle | |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||||
| |||||
| |||||
| |||||
| |||||
| articlesupplier | |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| categorypic | |||
| |||
| |||
| |||
| |||
| |||||||
| |||||||
| |||||||
| |||||||
| |||||||
| |||||||
| |||||||
| |||||||
| |||||||
| |||||||
| |||||||
| |||||||
| brandpic | |||
| |||
| |||
| |||
| |||
| articlepic | |||
| |||
| |||
| |||
| |||
| categorypic | |||
| |||
| |||
| |||
| |||
| articlepic | |||
| |||
| |||
| |||
| |||
| brandpic | |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| ledger | |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||||
| |||||
| |||||
| |||||
| |||||
| |||||
| |||||
| |||||
| |||||
| |||||
| |||||
| |||||
| |||||
| |||||
| |||||
| |||||
| |||||
| manifestattachment | |||
| |||
| |||
| |||
| |||
| |||||||||
| |||||||||
| |||||||||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| posterminalcategory | |||
| |||
| |||
| |||
| posterminalcategory | |||
| |||
| |||
| |||
| Legend | |
| PK | primary key |
| FK | foreign key |
| ? | nullable column |
| — | FOREIGN KEY constraint |
| - - | naming convention only, no constraint |