Add import/export tooling and templates

This commit is contained in:
beatz174-bit
2025-11-25 08:40:10 +10:00
parent 5ddd41ec24
commit dc7fc02d59
15 changed files with 1138 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
StockFill import/export templates
=================================
Each CSV is UTF-8 encoded and uses headers as the first row. Fields marked optional can be left blank.
- ids are optional; missing ids will be generated automatically.
- Names are preferred for mapping relationships (e.g., category name instead of id).
Files
-----
- areas_template.csv — columns: id, name, created_at, updated_at
- categories_template.csv — columns: id, name, created_at, updated_at
- products_template.csv — columns: id, name, category (name), unit_type, bulk_name, barcode, archived, created_at, updated_at
- picklists_template.csv — columns: id, area_id, area_name, created_at, completed_at, notes, categories (semicolon separated names), auto_add_new_products
- pickitems_template.csv — columns: id, pick_list_id, pick_list_name, product_id, product_name, quantity, is_carton, status, created_at, updated_at
Notes
-----
- Category and area names are matched case-insensitively.
- Product names are deduplicated case-insensitively; duplicate names will be skipped.
- If a referenced name is missing and auto-create is enabled, the importer will create the required area/category/product.
- Barcode collisions are avoided automatically during import.
+3
View File
@@ -0,0 +1,3 @@
id,name,created_at,updated_at
# id optional — you can use empty for new rows. created/updated optional
Area A,,
1 id,name,created_at,updated_at
2 # id optional — you can use empty for new rows. created/updated optional
3 Area A,,
+2
View File
@@ -0,0 +1,2 @@
id,name,created_at,updated_at
Clothing,,
1 id,name,created_at,updated_at
2 Clothing,,
+2
View File
@@ -0,0 +1,2 @@
id,pick_list_id,pick_list_name,product_id,product_name,quantity,is_carton,status,created_at,updated_at
,,"My Pick List",,"Blue T-Shirt",2,false,pending,,
1 id pick_list_id pick_list_name product_id product_name quantity is_carton status created_at updated_at
2 My Pick List Blue T-Shirt 2 false pending
+2
View File
@@ -0,0 +1,2 @@
id,area_id,area_name,created_at,completed_at,notes,categories,auto_add_new_products
,,"Area A",,,"","Clothing;Accessories",false
1 id area_id area_name created_at completed_at notes categories auto_add_new_products
2 Area A Clothing;Accessories false
+2
View File
@@ -0,0 +1,2 @@
id,name,category,unit_type,bulk_name,barcode,archived,created_at,updated_at
"Blue T-Shirt","Clothing","unit","carton","0123456789012",false,,
1 id name category unit_type bulk_name barcode archived created_at updated_at
2 Blue T-Shirt Clothing unit carton 0123456789012 false