@carthooks/arcubase-cli 0.1.2 → 0.1.4

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.
Files changed (106) hide show
  1. package/bundle/arcubase-admin.mjs +1238 -16
  2. package/bundle/arcubase.mjs +1238 -16
  3. package/dist/bin/arcubase-admin.js +0 -0
  4. package/dist/bin/arcubase.js +0 -0
  5. package/dist/runtime/command_registry.d.ts +8 -0
  6. package/dist/runtime/command_registry.d.ts.map +1 -1
  7. package/dist/runtime/command_registry.js +35 -0
  8. package/dist/runtime/entity_save_schema.d.ts +15 -0
  9. package/dist/runtime/entity_save_schema.d.ts.map +1 -0
  10. package/dist/runtime/entity_save_schema.js +641 -0
  11. package/dist/runtime/errors.d.ts +11 -0
  12. package/dist/runtime/errors.d.ts.map +1 -1
  13. package/dist/runtime/execute.d.ts.map +1 -1
  14. package/dist/runtime/execute.js +294 -12
  15. package/dist/runtime/upload.d.ts +13 -0
  16. package/dist/runtime/upload.d.ts.map +1 -0
  17. package/dist/runtime/upload.js +148 -0
  18. package/dist/runtime/zod_registry.d.ts +6 -0
  19. package/dist/runtime/zod_registry.d.ts.map +1 -1
  20. package/dist/runtime/zod_registry.js +136 -0
  21. package/dist/tests/command_registry.test.js +5 -0
  22. package/dist/tests/entity_save_schema.test.d.ts +2 -0
  23. package/dist/tests/entity_save_schema.test.d.ts.map +1 -0
  24. package/dist/tests/entity_save_schema.test.js +221 -0
  25. package/dist/tests/execute_validation.test.js +603 -0
  26. package/dist/tests/help.test.js +49 -0
  27. package/dist/tests/upload.test.d.ts +2 -0
  28. package/dist/tests/upload.test.d.ts.map +1 -0
  29. package/dist/tests/upload.test.js +107 -0
  30. package/package.json +1 -1
  31. package/sdk-dist/docs/runtime-reference/README.md +187 -0
  32. package/sdk-dist/docs/runtime-reference/entity-schema/README.md +120 -0
  33. package/sdk-dist/docs/runtime-reference/entity-schema/address.md +34 -0
  34. package/sdk-dist/docs/runtime-reference/entity-schema/boolean.md +37 -0
  35. package/sdk-dist/docs/runtime-reference/entity-schema/button.md +47 -0
  36. package/sdk-dist/docs/runtime-reference/entity-schema/checkbox.md +61 -0
  37. package/sdk-dist/docs/runtime-reference/entity-schema/datasets.md +35 -0
  38. package/sdk-dist/docs/runtime-reference/entity-schema/datetime.md +40 -0
  39. package/sdk-dist/docs/runtime-reference/entity-schema/department.md +33 -0
  40. package/sdk-dist/docs/runtime-reference/entity-schema/departments.md +34 -0
  41. package/sdk-dist/docs/runtime-reference/entity-schema/divider.md +39 -0
  42. package/sdk-dist/docs/runtime-reference/entity-schema/file.md +53 -0
  43. package/sdk-dist/docs/runtime-reference/entity-schema/formula.md +44 -0
  44. package/sdk-dist/docs/runtime-reference/entity-schema/image.md +52 -0
  45. package/sdk-dist/docs/runtime-reference/entity-schema/linkto.md +67 -0
  46. package/sdk-dist/docs/runtime-reference/entity-schema/location.md +32 -0
  47. package/sdk-dist/docs/runtime-reference/entity-schema/lookup.md +41 -0
  48. package/sdk-dist/docs/runtime-reference/entity-schema/member.md +37 -0
  49. package/sdk-dist/docs/runtime-reference/entity-schema/members.md +31 -0
  50. package/sdk-dist/docs/runtime-reference/entity-schema/number.md +70 -0
  51. package/sdk-dist/docs/runtime-reference/entity-schema/query.md +50 -0
  52. package/sdk-dist/docs/runtime-reference/entity-schema/radio.md +53 -0
  53. package/sdk-dist/docs/runtime-reference/entity-schema/relation.md +55 -0
  54. package/sdk-dist/docs/runtime-reference/entity-schema/relationfield.md +38 -0
  55. package/sdk-dist/docs/runtime-reference/entity-schema/rollup.md +54 -0
  56. package/sdk-dist/docs/runtime-reference/entity-schema/select.md +63 -0
  57. package/sdk-dist/docs/runtime-reference/entity-schema/selects.md +51 -0
  58. package/sdk-dist/docs/runtime-reference/entity-schema/serialnumber.md +48 -0
  59. package/sdk-dist/docs/runtime-reference/entity-schema/signature.md +31 -0
  60. package/sdk-dist/docs/runtime-reference/entity-schema/status.md +70 -0
  61. package/sdk-dist/docs/runtime-reference/entity-schema/subform.md +74 -0
  62. package/sdk-dist/docs/runtime-reference/entity-schema/tags.md +19 -0
  63. package/sdk-dist/docs/runtime-reference/entity-schema/text.md +76 -0
  64. package/sdk-dist/docs/runtime-reference/entity-schema/textarea.md +47 -0
  65. package/sdk-dist/docs/runtime-reference/entity-schema/workflow_status.md +17 -0
  66. package/sdk-dist/docs/runtime-reference/entity-schema.md +197 -0
  67. package/sdk-dist/docs/runtime-reference/examples/README.md +51 -0
  68. package/sdk-dist/docs/runtime-reference/examples/crm-01/README.md +20 -0
  69. package/sdk-dist/docs/runtime-reference/examples/mes-01/README.md +21 -0
  70. package/sdk-dist/docs/runtime-reference/examples/oms-01/README.md +183 -0
  71. package/sdk-dist/docs/runtime-reference/examples/oms-01/app-overview.md +79 -0
  72. package/sdk-dist/docs/runtime-reference/examples/oms-01/create-app.json +3 -0
  73. package/sdk-dist/docs/runtime-reference/examples/oms-01/goods-receipt.create-entity.json +3 -0
  74. package/sdk-dist/docs/runtime-reference/examples/oms-01/goods-receipt.schema.json +159 -0
  75. package/sdk-dist/docs/runtime-reference/examples/oms-01/item-master.create-entity.json +3 -0
  76. package/sdk-dist/docs/runtime-reference/examples/oms-01/item-master.schema.json +179 -0
  77. package/sdk-dist/docs/runtime-reference/examples/oms-01/picking-list.create-entity.json +3 -0
  78. package/sdk-dist/docs/runtime-reference/examples/oms-01/picking-list.schema.json +168 -0
  79. package/sdk-dist/docs/runtime-reference/examples/oms-01/purchase-order.create-entity.json +3 -0
  80. package/sdk-dist/docs/runtime-reference/examples/oms-01/purchase-order.schema.json +417 -0
  81. package/sdk-dist/docs/runtime-reference/examples/oms-01/sales-order.bulk-update.json +22 -0
  82. package/sdk-dist/docs/runtime-reference/examples/oms-01/sales-order.create-entity.json +3 -0
  83. package/sdk-dist/docs/runtime-reference/examples/oms-01/sales-order.query.json +10 -0
  84. package/sdk-dist/docs/runtime-reference/examples/oms-01/sales-order.row.insert.json +28 -0
  85. package/sdk-dist/docs/runtime-reference/examples/oms-01/sales-order.schema.json +398 -0
  86. package/sdk-dist/docs/runtime-reference/examples/oms-01/sales-order.selection.condition.json +13 -0
  87. package/sdk-dist/docs/runtime-reference/examples/oms-01/sales-order.selection.ids.json +7 -0
  88. package/sdk-dist/docs/runtime-reference/examples/oms-01/stock-issue.create-entity.json +3 -0
  89. package/sdk-dist/docs/runtime-reference/examples/oms-01/stock-issue.schema.json +137 -0
  90. package/sdk-dist/docs/runtime-reference/examples/wms-01/README.md +21 -0
  91. package/sdk-dist/docs/runtime-reference/row-crud.md +188 -0
  92. package/sdk-dist/docs/runtime-reference/search-and-bulk-actions.md +494 -0
  93. package/sdk-dist/docs/runtime-reference/table-lifecycle.md +135 -0
  94. package/sdk-dist/docs/runtime-reference/uploads.md +106 -0
  95. package/sdk-dist/docs/runtime-reference/workflow/README.md +19 -0
  96. package/src/runtime/command_registry.ts +47 -0
  97. package/src/runtime/entity_save_schema.ts +708 -0
  98. package/src/runtime/errors.ts +12 -0
  99. package/src/runtime/execute.ts +367 -12
  100. package/src/runtime/upload.ts +196 -0
  101. package/src/runtime/zod_registry.ts +156 -0
  102. package/src/tests/command_registry.test.ts +6 -0
  103. package/src/tests/entity_save_schema.test.ts +236 -0
  104. package/src/tests/execute_validation.test.ts +781 -0
  105. package/src/tests/help.test.ts +60 -0
  106. package/src/tests/upload.test.ts +133 -0
@@ -0,0 +1,197 @@
1
+ # Entity Schema
2
+
3
+ Use this page when writing the full table schema with `arcubase-admin`.
4
+
5
+ Primary command:
6
+
7
+ ```bash
8
+ arcubase-admin entity admin-save-entity \
9
+ --app-id <app_id> \
10
+ --entity-id <entity_id> \
11
+ --body-file save-entity.json
12
+ ```
13
+
14
+ Before writing `save-entity.json`, always fetch the current shell:
15
+
16
+ ```bash
17
+ arcubase-admin entity admin-get-entity-info \
18
+ --app-id <app_id> \
19
+ --entity-id <entity_id>
20
+ ```
21
+
22
+ If you already know the field type you want, go to:
23
+
24
+ - `entity-schema/README.md`
25
+
26
+ ## One successful path
27
+
28
+ The current direct-write path is:
29
+
30
+ 1. create the entity shell
31
+ 2. fetch the current shell
32
+ 3. save the full schema
33
+ 4. probe rows with `arcubase workflow query-entity`
34
+
35
+ Do not treat shell creation as “table created”.
36
+
37
+ ## Top-level save payload
38
+
39
+ The practical save-ready shape is:
40
+
41
+ ```json
42
+ {
43
+ "id": 2188889845,
44
+ "app_id": 2188889844,
45
+ "name": "Order",
46
+ "workflow_enabled": false,
47
+ "fields": [],
48
+ "layout": [],
49
+ "options": {},
50
+ "schema_version": 0,
51
+ "field_id_seq": 1001,
52
+ "current_serial": null
53
+ }
54
+ ```
55
+
56
+ Rules:
57
+
58
+ - start from the current shell
59
+ - reuse `schema_version` from the shell
60
+ - keep `id`, `app_id`, `name`, and `workflow_enabled`
61
+ - do not rebuild top-level `options` unless you really need to
62
+
63
+ ## Shell placeholder normalization
64
+
65
+ The fetched shell may contain placeholder `null` values such as:
66
+
67
+ - `layout: null`
68
+ - `current_serial: null`
69
+ - `options.Buttons: null`
70
+ - `options.CustomActions: null`
71
+ - `options.FrontendEvents: null`
72
+ - `options.TitleFormat.Fields: null`
73
+ - `options.TitleFormat.Parts: null`
74
+ - `options.misc: null`
75
+
76
+ Normalize them before saving:
77
+
78
+ - `layout -> []`
79
+ - remove `current_serial` when it is `null`
80
+ - `Buttons/CustomActions/FrontendEvents -> []`
81
+ - `TitleFormat.Fields/Parts -> []`
82
+ - `misc -> {}`
83
+
84
+ The CLI already performs this normalization on the direct save path. Your `save-entity.json` should follow the same shape.
85
+
86
+ ## Global invariants
87
+
88
+ - `fields` must be `FieldVO[]`
89
+ - field ids should start from `1001`
90
+ - field ids must be positive and non-zero
91
+ - `field_id_seq > max(field.id)`
92
+ - `layout` is `number[][]`
93
+ - top-level `layout` may only reference top-level field ids
94
+ - for non-`subform` fields, `children` should be `null`
95
+ - saved `subform` payload keeps `children` only
96
+ - do not write `subform.layout`
97
+ - `lookup.options.relation.local_linkto_field_id` must point to a `linkto` field
98
+ - `rollup.options.relation.local_linkto_field_id` must point to a `linkto` field
99
+ - formula references must point to real field ids
100
+ - do not manually add `tags`
101
+ - do not manually add `workflow_status`
102
+
103
+ ## Generic field shape
104
+
105
+ Each field in `fields[]` keeps the full base `FieldVO` shape:
106
+
107
+ ```json
108
+ {
109
+ "id": 1001,
110
+ "label": "Order No.",
111
+ "type": "text",
112
+ "required": true,
113
+ "unique": false,
114
+ "editable": true,
115
+ "visible": true,
116
+ "show_label": true,
117
+ "scannable": false,
118
+ "default_value_mode": 0,
119
+ "description": "",
120
+ "value": null,
121
+ "number_decimal": 0,
122
+ "depends": [],
123
+ "key": "order_no",
124
+ "code_index": false,
125
+ "options": {},
126
+ "transfers": null,
127
+ "children": null
128
+ }
129
+ ```
130
+
131
+ Field pages focus on field-specific `options`, but your real `save-entity.json` still needs the full base shape around them.
132
+
133
+ ## Layout shape
134
+
135
+ `layout` is not a flat array. Use `number[][]`.
136
+
137
+ Example:
138
+
139
+ ```json
140
+ [
141
+ [1001, 1002],
142
+ [1003],
143
+ [1004]
144
+ ]
145
+ ```
146
+
147
+ Each inner array is one layout row. Only reference top-level field ids here.
148
+
149
+ ## Entity-level options boundary
150
+
151
+ This document is for `admin-save-entity`.
152
+
153
+ Keep that command focused on:
154
+
155
+ - `name`
156
+ - `workflow_enabled`
157
+ - `fields`
158
+ - `layout`
159
+ - `field_id_seq`
160
+
161
+ Do not overload this save file with unrelated UI payloads just because the shell contains them.
162
+
163
+ ## Fast-fail rules
164
+
165
+ The CLI should stop immediately when:
166
+
167
+ - `fields` is an object instead of an array
168
+ - `field_id_seq` is too small
169
+ - `layout` references a missing field id
170
+ - saved payload includes `subform.layout`
171
+ - `local_linkto_field_id` points to a non-`linkto` field
172
+ - formula references a missing field id
173
+
174
+ Also:
175
+
176
+ - if the JSON response contains a top-level `error`, treat the command as failed even when the HTTP status is `200`
177
+
178
+ ## Minimal success criteria
179
+
180
+ Do not call schema creation successful until:
181
+
182
+ 1. `arcubase-admin entity admin-save-entity ...` succeeds without top-level `error`
183
+ 2. `arcubase workflow query-entity ...` succeeds against the saved table
184
+
185
+ If row probing still fails, the table is not ready.
186
+
187
+ ## Row payload reminder
188
+
189
+ This document is only for schema save.
190
+
191
+ If you need row payloads after the schema is ready:
192
+
193
+ - read `row-crud.md`
194
+
195
+ If you need field-specific save fragments:
196
+
197
+ - read `entity-schema/README.md`
@@ -0,0 +1,51 @@
1
+ # Runtime Examples
2
+
3
+ Use this directory when the field-level reference is not enough and you need a business-shaped example.
4
+
5
+ These examples are:
6
+
7
+ - genericized from real production structures
8
+ - written in English
9
+ - stripped of tenant-specific branding
10
+ - stripped of market-specific vocabulary
11
+ - intended as copy-and-adapt templates for CLI usage
12
+
13
+ These examples are not raw tenant exports.
14
+
15
+ ## Rules
16
+
17
+ - Keep table names and field names in English.
18
+ - Remove company-specific words.
19
+ - Remove region-specific words when they are not essential to the workflow.
20
+ - Prefer neutral names such as `sku_code`, `sales_order`, `goods_receipt`, and `stock_issue`.
21
+ - When a save payload needs shell values, replace placeholder tokens such as `__APP_ID__`, `__ENTITY_ID__`, and `__SCHEMA_VERSION__` from the current shell returned by:
22
+
23
+ ```bash
24
+ arcubase-admin entity admin-get-entity-info \
25
+ --app-id <app_id> \
26
+ --entity-id <entity_id>
27
+ ```
28
+
29
+ ## Available example sets
30
+
31
+ - `oms-01/`
32
+ - order management
33
+ - item master
34
+ - goods receipt
35
+ - stock issue
36
+ - picking list
37
+ - purchase order
38
+ - sales order
39
+ - `mes-01/`
40
+ - manufacturing execution examples
41
+ - `wms-01/`
42
+ - warehouse and inventory examples
43
+ - `crm-01/`
44
+ - customer, quote, and invoice examples
45
+
46
+ ## Recommended reading order
47
+
48
+ 1. `../table-lifecycle.md`
49
+ 2. `../entity-schema.md`
50
+ 3. `oms-01/README.md`
51
+ 4. the exact `*.schema.json` and `*.json` example you need
@@ -0,0 +1,20 @@
1
+ # CRM Example 01
2
+
3
+ This directory is reserved for a generic CRM and quote example set.
4
+
5
+ Planned tables:
6
+
7
+ - `Customer`
8
+ - `Contact`
9
+ - `Quote`
10
+ - `Invoice`
11
+
12
+ Planned field patterns:
13
+
14
+ - `text`
15
+ - `select`
16
+ - `status`
17
+ - `member`
18
+ - `textarea`
19
+
20
+ All names will remain generic and English-only.
@@ -0,0 +1,21 @@
1
+ # MES Example 01
2
+
3
+ This directory is reserved for a generic manufacturing execution example set.
4
+
5
+ Planned tables:
6
+
7
+ - `Work Order`
8
+ - `Bill Of Material`
9
+ - `Routing Template`
10
+ - `Production Checkpoint`
11
+
12
+ Planned field patterns:
13
+
14
+ - `subform`
15
+ - `relation`
16
+ - `relationfield`
17
+ - `datasets`
18
+ - `member`
19
+ - `status`
20
+
21
+ All names will remain generic and English-only.
@@ -0,0 +1,183 @@
1
+ # OMS Example 01
2
+
3
+ This example set models a compact order-management workflow.
4
+
5
+ It is intentionally generic:
6
+
7
+ - no tenant name
8
+ - no company name
9
+ - no country-specific codes
10
+ - no region-specific channel names
11
+
12
+ ## Scope
13
+
14
+ This set includes:
15
+
16
+ - `Item Master`
17
+ - `Goods Receipt`
18
+ - `Stock Issue`
19
+ - `Picking List`
20
+ - `Sales Order`
21
+ - `Purchase Order`
22
+
23
+ ## Why these tables
24
+
25
+ This combination is enough to cover:
26
+
27
+ - item master records
28
+ - inbound stock
29
+ - outbound stock
30
+ - picking operations
31
+ - sales orders with line items
32
+ - purchase orders with planned and actual receipt subforms
33
+
34
+ ## Important genericization choices
35
+
36
+ The production references contained market-specific naming such as:
37
+
38
+ - local barcode naming
39
+ - local purchase wording
40
+ - local shipping wording
41
+ - language-specific labels
42
+
43
+ This example rewrites them into generic names such as:
44
+
45
+ - `sku_code`
46
+ - `source_channel`
47
+ - `recipient_name`
48
+ - `goods_receipt`
49
+ - `stock_issue`
50
+
51
+ ## Files
52
+
53
+ - `app-overview.md`
54
+ - `create-app.json`
55
+ - `sales-order.create-entity.json`
56
+ - `item-master.create-entity.json`
57
+ - `item-master.schema.json`
58
+ - `goods-receipt.schema.json`
59
+ - `stock-issue.schema.json`
60
+ - `picking-list.schema.json`
61
+ - `sales-order.schema.json`
62
+ - `purchase-order.schema.json`
63
+ - `goods-receipt.create-entity.json`
64
+ - `stock-issue.create-entity.json`
65
+ - `picking-list.create-entity.json`
66
+ - `purchase-order.create-entity.json`
67
+ - `sales-order.row.insert.json`
68
+ - `sales-order.query.json`
69
+ - `sales-order.selection.ids.json`
70
+ - `sales-order.selection.condition.json`
71
+ - `sales-order.bulk-update.json`
72
+
73
+ ## Save workflow
74
+
75
+ For every `*.schema.json` file:
76
+
77
+ 1. create the entity shell
78
+ 2. fetch the shell with `admin-get-entity-info`
79
+ 3. replace:
80
+ - `__APP_ID__`
81
+ - `__ENTITY_ID__`
82
+ - `__SCHEMA_VERSION__`
83
+ 4. save the schema with `admin-save-entity`
84
+ 5. probe rows with `query-entity`
85
+
86
+ These schema files are templates, not live shell exports.
87
+
88
+ ## CLI phases
89
+
90
+ Phase 1 uses `arcubase-admin`:
91
+
92
+ - create the app
93
+ - create entity shells
94
+ - fetch shells
95
+ - save schemas
96
+
97
+ Phase 2 uses `arcubase`:
98
+
99
+ - insert rows
100
+ - query rows
101
+ - update rows
102
+ - delete or restore rows
103
+ - search, selection, and bulk actions
104
+
105
+ Do not use `arcubase-admin` for row operations.
106
+
107
+ ## Minimal command path
108
+
109
+ Create the app:
110
+
111
+ ```bash
112
+ arcubase-admin app create-app-by-tenants --body-file create-app.json
113
+ ```
114
+
115
+ Create the shell:
116
+
117
+ ```bash
118
+ arcubase-admin app create-entity --id <app_id> --body-file sales-order.create-entity.json
119
+ arcubase-admin app create-entity --id <app_id> --body-file item-master.create-entity.json
120
+ arcubase-admin app create-entity --id <app_id> --body-file goods-receipt.create-entity.json
121
+ arcubase-admin app create-entity --id <app_id> --body-file stock-issue.create-entity.json
122
+ arcubase-admin app create-entity --id <app_id> --body-file picking-list.create-entity.json
123
+ arcubase-admin app create-entity --id <app_id> --body-file purchase-order.create-entity.json
124
+ ```
125
+
126
+ Fetch the shell:
127
+
128
+ ```bash
129
+ arcubase-admin entity admin-get-entity-info --app-id <app_id> --entity-id <entity_id>
130
+ ```
131
+
132
+ Save the schema:
133
+
134
+ ```bash
135
+ arcubase-admin entity admin-save-entity --app-id <app_id> --entity-id <entity_id> --body-file sales-order.schema.json
136
+ arcubase-admin entity admin-save-entity --app-id <app_id> --entity-id <entity_id> --body-file item-master.schema.json
137
+ arcubase-admin entity admin-save-entity --app-id <app_id> --entity-id <entity_id> --body-file goods-receipt.schema.json
138
+ arcubase-admin entity admin-save-entity --app-id <app_id> --entity-id <entity_id> --body-file stock-issue.schema.json
139
+ arcubase-admin entity admin-save-entity --app-id <app_id> --entity-id <entity_id> --body-file picking-list.schema.json
140
+ arcubase-admin entity admin-save-entity --app-id <app_id> --entity-id <entity_id> --body-file purchase-order.schema.json
141
+ ```
142
+
143
+ Insert one row:
144
+
145
+ ```bash
146
+ arcubase workflow insert-entity --app-id <app_id> --entity-id <entity_id> --body-file sales-order.row.insert.json
147
+ ```
148
+
149
+ Query rows:
150
+
151
+ ```bash
152
+ arcubase workflow query-entity --app-id <app_id> --entity-id <entity_id> --body-file sales-order.query.json
153
+ ```
154
+
155
+ ## Placeholder rules
156
+
157
+ The schema files use placeholders for:
158
+
159
+ - `__APP_ID__`
160
+ - `__ENTITY_ID__`
161
+ - `__SCHEMA_VERSION__`
162
+
163
+ The relation-based templates also use:
164
+
165
+ - `__ITEM_MASTER_ENTITY_ID__`
166
+
167
+ When you replace them, keep these fields as JSON numbers:
168
+
169
+ - `app_id`
170
+ - `id`
171
+ - `schema_version`
172
+ - relation `app_id`
173
+ - relation `entity_id`
174
+
175
+ Do not leave the replaced values as JSON strings.
176
+
177
+ ## Dependency order
178
+
179
+ `Goods Receipt` and `Stock Issue` both depend on an existing `Item Master` entity.
180
+
181
+ Create and save `Item Master` first, then replace `__ITEM_MASTER_ENTITY_ID__`
182
+ with the numeric entity id of that local `Item Master` shell before you save the
183
+ dependent schemas.
@@ -0,0 +1,79 @@
1
+ # OMS Example 01 Overview
2
+
3
+ ## Table set
4
+
5
+ ### 1. Item Master
6
+
7
+ Purpose:
8
+
9
+ - hold the canonical item record
10
+ - provide `sku_code`
11
+ - provide item naming and pricing
12
+
13
+ ### 2. Goods Receipt
14
+
15
+ Purpose:
16
+
17
+ - record inbound quantities
18
+ - link a receipt row to one item
19
+
20
+ ### 3. Stock Issue
21
+
22
+ Purpose:
23
+
24
+ - record outbound quantities
25
+ - link an issue row to one item
26
+
27
+ ### 4. Picking List
28
+
29
+ Purpose:
30
+
31
+ - group picked items for fulfillment
32
+ - use a subform for item lines
33
+
34
+ ### 5. Sales Order
35
+
36
+ Purpose:
37
+
38
+ - capture recipient information
39
+ - capture one order with multiple line items
40
+ - support search, selection, and bulk update examples
41
+
42
+ ### 6. Purchase Order
43
+
44
+ Purpose:
45
+
46
+ - capture ordered quantities
47
+ - track planned receipt slots
48
+ - track actual receipt slots
49
+ - show one `status` field example and two `subform` examples
50
+
51
+ ## Relationship model
52
+
53
+ - `Goods Receipt` links to `Item Master`
54
+ - `Stock Issue` links to `Item Master`
55
+ - `Sales Order` has `line_items` as a subform
56
+ - `Picking List` has `items` as a subform
57
+ - `Purchase Order` has:
58
+ - `planned_receipts`
59
+ - `actual_receipts`
60
+
61
+ ## Field patterns covered
62
+
63
+ - `text`
64
+ - `textarea`
65
+ - `number`
66
+ - `datetime`
67
+ - `select`
68
+ - `radio`
69
+ - `status`
70
+ - `image`
71
+ - `relation`
72
+ - `subform`
73
+
74
+ ## What was intentionally removed
75
+
76
+ - country-specific code naming
77
+ - tenant-specific internal labels
78
+ - region-specific channel names
79
+ - company-specific workflow terms
@@ -0,0 +1,3 @@
1
+ {
2
+ "name": "OMS Example 01"
3
+ }