This commit is contained in:
2026-08-21 19:55:40 +02:00
parent 81b226a3da
commit 86183322c7
2 changed files with 106 additions and 13 deletions
+43 -5
View File
@@ -113,7 +113,7 @@ CREATE TABLE IF NOT EXISTS values (
-- Property Table
CREATE TABLE IF NOT EXISTS propertys (
id BIGINT PRIMARY KEY DEFAULT nextval('global_id_seq'),
Label TEXT,
label TEXT,
description TEXT,
propertyTypeId BIGINT,
productId BIGINT,
@@ -123,7 +123,7 @@ CREATE TABLE IF NOT EXISTS propertys (
-- PropertyType Table
CREATE TABLE IF NOT EXISTS propertyTypes(
id BIGINT PRIMARY KEY DEFAULT nextval('global_id_seq'),
Label TEXT,
label TEXT,
description TEXT,
propertyId BIGINT
);
@@ -131,7 +131,7 @@ CREATE TABLE IF NOT EXISTS propertyTypes(
-- PropertyTypeGroupTable
CREATE TABLE IF NOT EXISTS propertyTypeGroups (
id BIGINT PRIMARY KEY DEFAULT nextval('global_id_seq'),
Label TEXT,
label TEXT,
description TEXT,
parentGroupId BIGINT
);
@@ -140,7 +140,7 @@ CREATE TABLE IF NOT EXISTS propertyTypeGroups (
-- Product Table
CREATE TABLE IF NOT EXISTS products (
id BIGINT PRIMARY KEY DEFAULT nextval('global_id_seq'),
Label TEXT,
abel TEXT,
externalId TEXT,
description TEXT,
productGroupId BIGINT
@@ -149,7 +149,7 @@ CREATE TABLE IF NOT EXISTS products (
-- ProductGroup Table
CREATE TABLE IF NOT EXISTS productGroups (
id BIGINT PRIMARY KEY DEFAULT nextval('global_id_seq'),
Label TEXT,
label TEXT,
description TEXT,
parentGroupId BIGINT
);
@@ -310,5 +310,43 @@ Wenn Daten zurückkommen, so wie hier im Beispiel, dann werden sie im *"data"* T
"label": "Red",
"description": "Color Red",
"propertyId": 100003
}
```
## Datenimport
### Produktdaten:
Produktdaten werden in folgenden JSON-Datenformat entgegen genommen:
```json
// Excample Productgroups
{
"group": {
"label": "HIFI",
"decription": "Hifi components",
"products": [
{
"label": "Radio 4711",
"externalId": "ABC0815"
"description": "modern Radio for Hifi",
"properties": {
"voltage": 240,
"Color": "red",
"watt": 15
},
},
]
}
}
// Example Productdata for new product import
{
}
```