diff --git a/buildtime/server/controller/importController.go b/buildtime/server/controller/importController.go index e730459ea..92af034be 100644 --- a/buildtime/server/controller/importController.go +++ b/buildtime/server/controller/importController.go @@ -3,15 +3,16 @@ package controller import ( "net/http" "simplycpq/models" + "simplycpq/services" "github.com/gin-gonic/gin" ) type ImportController struct { - importService *ImportService + importService *services.ImportService } -func NewImportController(i *ImportService) *ImportController { +func NewImportController(i *services.ImportService) *ImportController { return &ImportController{ importService: i, } @@ -47,6 +48,7 @@ func (ic *ImportController) ImportProductGroups(c *gin.Context) { c.JSON(http.StatusOK, gin.H{"message": "Import ProductGroups endpoint"}) } +/* func (ic *ImportController) ImportProducts(c *gin.Context) { // Implement the logic for importing Products here var importData []models.ImportProduct @@ -61,3 +63,4 @@ func (ic *ImportController) ImportProducts(c *gin.Context) { } c.JSON(http.StatusOK, gin.H{"message": "Import Products endpoint"}) } +*/ diff --git a/buildtime/server/examples/household_example/productGroups.json b/buildtime/server/examples/household_example/productGroups.json index 6791bd7cd..b55e3aac3 100644 --- a/buildtime/server/examples/household_example/productGroups.json +++ b/buildtime/server/examples/household_example/productGroups.json @@ -8,15 +8,1098 @@ "productGroups": [ { "label": "HIFI", - "description": "All HIFI products" - }, - { - "label": "Kitchen", - "description": "All kitchen products" + "description": "All HIFI products", + "products": [ + { + "externalId": "Radio_RAD-001", + "productGroupLabel": "Radio", + "label": "RAD-001", + "description": "Kompakter UKW‑Radio mit stabilem Metallgehäuse, ideal für das Schlafzimmer oder Büro.", + "properties": [ + { "property": "Spannungsversorgung (V)", "value": 220 }, + { "property": "Leistung (W)", "value": 0 }, + { "property": "Ausgangsimpedanz (Ω)", "value": 75 }, + { "property": "Eingangsimpedanz (Ω)", "value": 10 }, + { "property": "Gewicht (kg)", "value": 2 }, + { "property": "Abmessungen (mm)", "value": "150x80x30" }, + { "property": "Frequenzbereich (Hz‑kHz)", "value": "87‑108" }, + { "property": "Signal‑Rausch‑Verhältnis (dB)", "value": 45 }, + { "property": "Anschlüsse", "value": "UKW" }, + { "property": "Preis (USD)", "value": 120 } + ] + }, + { + "externalId": "Radio_RAD-002", + "productGroupLabel": "Radio", + "label": "RAD-002", + "description": "Radio mit digitalem Tuner und DAB‑Empfang, liefert kristallklaren Klang und einfache Programmwahl.", + "properties": [ + { "property": "Spannungsversorgung (V)", "value": 230 }, + { "property": "Leistung (W)", "value": 0 }, + { "property": "Ausgangsimpedanz (Ω)", "value": 75 }, + { "property": "Eingangsimpedanz (Ω)", "value": 10 }, + { "property": "Gewicht (kg)", "value": 2 }, + { "property": "Abmessungen (mm)", "value": "155x85x32" }, + { "property": "Frequenzbereich (Hz‑kHz)", "value": "87‑108" }, + { "property": "Signal‑Rausch‑Verhältnis (dB)", "value": 48 }, + { "property": "Anschlüsse", "value": "UKW+DL" }, + { "property": "Preis (USD)", "value": 135 } + ] + }, + { + "externalId": "Radio_RAD-003", + "productGroupLabel": "Radio", + "label": "RAD-003", + "description": "Bluetooth‑fähiges Radio, das sich nahtlos mit Smartphones verbindet – Streamen Sie Ihre Lieblingssender.", + "properties": [ + { "property": "Spannungsversorgung (V)", "value": 220 }, + { "property": "Leistung (W)", "value": 0 }, + { "property": "Ausgangsimpedanz (Ω)", "value": 75 }, + { "property": "Eingangsimpedanz (Ω)", "value": 10 }, + { "property": "Gewicht (kg)", "value": 2 }, + { "property": "Abmessungen (mm)", "value": "158x88x33" }, + { "property": "Frequenzbereich (Hz‑kHz)", "value": "87‑108" }, + { "property": "Signal‑Rausch‑Verhältnis (dB)", "value": 46 }, + { "property": "Anschlüsse", "value": "UKW+Bluetooth" }, + { "property": "Preis (USD)", "value": 150 } + ] + }, + { + "externalId": "Radio_RAD-004", + "productGroupLabel": "Radio", + "label": "RAD-004", + "description": "Wi‑Fi‑Radio mit App‑Steuerung, lässt sich über das Smartphone konfigurieren.", + "properties": [ + { "property": "Spannungsversorgung (V)", "value": 230 }, + { "property": "Leistung (W)", "value": 0 }, + { "property": "Ausgangsimpedanz (Ω)", "value": 75 }, + { "property": "Eingangsimpedanz (Ω)", "value": 10 }, + { "property": "Gewicht (kg)", "value": 2 }, + { "property": "Abmessungen (mm)", "value": "160x90x35" }, + { "property": "Frequenzbereich (Hz‑kHz)", "value": "87‑108" }, + { "property": "Signal‑Rausch‑Verhältnis (dB)", "value": 47 }, + { "property": "Anschlüsse", "value": "UKW+Wi‑Fi" }, + { "property": "Preis (USD)", "value": 165 } + ] + }, + { + "externalId": "Radio_RAD-005", + "productGroupLabel": "Radio", + "label": "RAD-005", + "properties": [ + { "property": "Spannungsversorgung (V)", "value": 220 }, + { "property": "Leistung (W)", "value": 0 }, + { "property": "Ausgangsimpedanz (Ω)", "value": 75 }, + { "property": "Eingangsimpedanz (Ω)", "value": 10 }, + { "property": "Gewicht (kg)", "value": 2 }, + { "property": "Abmessungen (mm)", "value": "162x92x36" }, + { "property": "Frequenzbereich (Hz‑kHz)", "value": "87‑108" }, + { "property": "Signal‑Rausch‑Verhältnis (dB)", "value": 44 }, + { "property": "Anschlüsse", "value": "UKW+DL+Bluetooth" }, + { "property": "Preis (USD)", "value": 180 } + ], + "description": "Vielseitiger Empfänger mit DAB, DL und Bluetooth – alle gängigen Hörquellen in einem Gerät." + }, + { + "externalId": "Radio_RAD-006", + "productGroupLabel": "Radio", + "label": "RAD-006", + "properties": [ + { "property": "Spannungsversorgung (V)", "value": 230 }, + { "property": "Leistung (W)", "value": 0 }, + { "property": "Ausgangsimpedanz (Ω)", "value": 75 }, + { "property": "Eingangsimpedanz (Ω)", "value": 10 }, + { "property": "Gewicht (kg)", "value": 2 }, + { "property": "Abmessungen (mm)", "value": "165x95x38" }, + { "property": "Frequenzbereich (Hz‑kHz)", "value": "87‑108" }, + { "property": "Signal‑Rausch‑Verhältnis (dB)", "value": 49 }, + { "property": "Anschlüsse", "value": "UKW+Wi‑Fi+DL" }, + { "property": "Preis (USD)", "value": 195 } + ], + "description": "Kombiniert WLAN‑Streaming, DAB‑Radio und klassische UKW‑Tuner in einem kompakten Gehäuse." + }, + { + "externalId": "Radio_RAD-007", + "productGroupLabel": "Radio", + "label": "RAD-007", + "properties": [ + { "property": "Spannungsversorgung (V)", "value": 220 }, + { "property": "Leistung (W)", "value": 0 }, + { "property": "Ausgangsimpedanz (Ω)", "value": 75 }, + { "property": "Eingangsimpedanz (Ω)", "value": 10 }, + { "property": "Gewicht (kg)", "value": 2 }, + { "property": "Abmessungen (mm)", "value": "168x98x40" }, + { "property": "Frequenzbereich (Hz‑kHz)", "value": "87‑108" }, + { "property": "Signal‑Rausch‑Verhältnis (dB)", "value": 45 }, + { "property": "Anschlüsse", "value": "UKW+Bluetooth+Wi‑Fi" }, + { "property": "Preis (USD)", "value": 210 } + ], + "description": "Premium‑Radio, das gleichzeitig Bluetooth‑ und Wi‑Fi‑Streams verarbeiten kann." + }, + { + "externalId": "Radio_RAD-008", + "productGroupLabel": "Radio", + "label": "RAD-008", + "properties": [ + { "property": "Spannungsversorgung (V)", "value": 230 }, + { "property": "Leistung (W)", "value": 0 }, + { "property": "Ausgangsimpedanz (Ω)", "value": 75 }, + { "property": "Eingangsimpedanz (Ω)", "value": 10 }, + { "property": "Gewicht (kg)", "value": 2 }, + { "property": "Abmessungen (mm)", "value": "170x100x42" }, + { "property": "Frequenzbereich (Hz‑kHz)", "value": "87‑108" }, + { "property": "Signal‑Rausch‑Verhältnis (dB)", "value": 47 }, + { "property": "Anschlüsse", "value": "UKW+DL+Bluetooth" }, + { "property": "Preis (USD)", "value": 225 } + ], + "description": "Digital‑ und Analog‑Radio mit hervorragender Signal‑Stabilität und Bluetooth‑Ausgabe." + }, + { + "externalId": "Radio_RAD-009", + "productGroupLabel": "Radio", + "label": "RAD-009", + "properties": [ + { "property": "Spannungsversorgung (V)", "value": 220 }, + { "property": "Leistung (W)", "value": 0 }, + { "property": "Ausgangsimpedanz (Ω)", "value": 75 }, + { "property": "Eingangsimpedanz (Ω)", "value": 10 }, + { "property": "Gewicht (kg)", "value": 2 }, + { "property": "Abmessungen (mm)", "value": "172x102x44" }, + { "property": "Frequenzbereich (Hz‑kHz)", "value": "87‑108" }, + { "property": "Signal‑Rausch‑Verhältnis (dB)", "value": 46 }, + { "property": "Anschlüsse", "value": "UKW+Wi‑Fi+DL" }, + { "property": "Preis (USD)", "value": 240 } + ], + "description": "Ideal für smarte Haushalte: WLAN‑Stream, DAB‑Radio und klassische UKW‑Begriffe." + }, + { + "externalId": "Radio_RAD-010", + "productGroupLabel": "Radio", + "label": "RAD-010", + "properties": [ + { "property": "Spannungsversorgung (V)", "value": 230 }, + { "property": "Leistung (W)", "value": 0 }, + { "property": "Ausgangsimpedanz (Ω)", "value": 75 }, + { "property": "Eingangsimpedanz (Ω)", "value": 10 }, + { "property": "Gewicht (kg)", "value": 2 }, + { "property": "Abmessungen (mm)", "value": "175x105x46" }, + { "property": "Frequenzbereich (Hz‑kHz)", "value": "87‑108" }, + { "property": "Signal‑Rausch‑Verhältnis (dB)", "value": 48 }, + { "property": "Anschlüsse", "value": "UKW+Bluetooth+DL" }, + { "property": "Preis (USD)", "value": 255 } + ], + "description": "Hochwertiges All‑In‑One‑Radio mit Komfort‑Steuerung per Fernbedienung." + }, + + { + "externalId": "Kassette_CAS-001", + "productGroupLabel": "Kassette", + "label": "CAS-001", + "properties": [ + { "property": "Spannungsversorgung (V)", "value": 220 }, + { "property": "Leistung (W)", "value": 20 }, + { "property": "Kapazität/Volumen (L)", "value": 0 }, + { "property": "Abmessungen (mm)", "value": "300x200x100" }, + { "property": "Gewicht (kg)", "value": 4 }, + { "property": "Energieeffizienzklasse", "value": "" }, + { "property": "Bedienungsart", "value": "RCA" }, + { "property": "Material Innenraum", "value": "" }, + { "property": "Zusatzfunktionen", "value": "" }, + { "property": "Preis (USD)", "value": 130 } + ], + "description": "Klassisches Cassette‑Deck, kompakt und robust – ideal für Retro‑Fans." + }, + { + "externalId": "Kassette_CAS-002", + "productGroupLabel": "Kassette", + "label": "CAS-002", + "properties": [ + { "property": "Spannungsversorgung (V)", "value": 220 }, + { "property": "Leistung (W)", "value": 20 }, + { "property": "Kapazität/Volumen (L)", "value": 0 }, + { "property": "Abmessungen (mm)", "value": "305x205x105" }, + { "property": "Gewicht (kg)", "value": 4 }, + { "property": "Energieeffizienzklasse", "value": "" }, + { "property": "Bedienungsart", "value": "RCA+3,5‑mm‑Klinke" }, + { "property": "Material Innenraum", "value": "" }, + { "property": "Zusatzfunktionen", "value": "" }, + { "property": "Preis (USD)", "value": 140 } + ], + "description": "Erweiterte Anschlussoptionen (RCA + Klinke) für externe Verstärker." + }, + { + "externalId": "Kassette_CAS-003", + "productGroupLabel": "Kassette", + "label": "CAS-003", + "properties": [ + { "property": "Spannungsversorgung (V)", "value": 230 }, + { "property": "Leistung (W)", "value": 22 }, + { "property": "Kapazität/Volumen (L)", "value": 0 }, + { "property": "Abmessungen (mm)", "value": "310x210x110" }, + { "property": "Gewicht (kg)", "value": 4 }, + { "property": "Energieeffizienzklasse", "value": "" }, + { "property": "Bedienungsart", "value": "RCA+USB" }, + { "property": "Material Innenraum", "value": "" }, + { "property": "Zusatzfunktionen", "value": "" }, + { "property": "Preis (USD)", "value": 150 } + ], + "description": "Mit USB‑Ausgang, ermöglicht das Digitalisieren von Kassetten auf den PC." + }, + { + "externalId": "Kassette_CAS-004", + "productGroupLabel": "Kassette", + "label": "CAS-004", + "properties": [ + { "property": "Spannungsversorgung (V)", "value": 220 }, + { "property": "Leistung (W)", "value": 22 }, + { "property": "Kapazität/Volumen (L)", "value": 0 }, + { "property": "Abmessungen (mm)", "value": "315x215x115" }, + { "property": "Gewicht (kg)", "value": 4 }, + { "property": "Energieeffizienzklasse", "value": "" }, + { "property": "Bedienungsart", "value": "RCA+Bluetooth" }, + { "property": "Material Innenraum", "value": "" }, + { "property": "Zusatzfunktionen", "value": "" }, + { "property": "Preis (USD)", "value": 160 } + ], + "description": "Bluetooth‑Sender integriert – streamen Sie Kassetten direkt zu Ihrem Wi‑Fi‑Lautsprecher." + }, + { + "externalId": "Kassette_CAS-005", + "productGroupLabel": "Kassette", + "label": "CAS-005", + "properties": [ + { "property": "Spannungsversorgung (V)", "value": 230 }, + { "property": "Leistung (W)", "value": 24 }, + { "property": "Kapazität/Volumen (L)", "value": 0 }, + { "property": "Abmessungen (mm)", "value": "320x220x120" }, + { "property": "Gewicht (kg)", "value": 4 }, + { "property": "Energieeffizienzklasse", "value": "" }, + { "property": "Bedienungsart", "value": "RCA+Wi‑Fi" }, + { "property": "Material Innenraum", "value": "" }, + { "property": "Zusatzfunktionen", "value": "" }, + { "property": "Preis (USD)", "value": 170 } + ], + "description": "WLAN‑Funktion erlaubt das direkte Hochladen von Aufnahmen in die Cloud." + }, + { + "externalId": "Kassette_CAS-006", + "productGroupLabel": "Kassette", + "label": "CAS-006", + "properties": [ + { "property": "Spannungsversorgung (V)", "value": 220 }, + { "property": "Leistung (W)", "value": 24 }, + { "property": "Kapazität/Volumen (L)", "value": 0 }, + { "property": "Abmessungen (mm)", "value": "325x225x125" }, + { "property": "Gewicht (kg)", "value": 4 }, + { "property": "Energieeffizienzklasse", "value": "" }, + { "property": "Bedienungsart", "value": "RCA+DL" }, + { "property": "Material Innenraum", "value": "" }, + { "property": "Zusatzfunktionen", "value": "" }, + { "property": "Preis (USD)", "value": 180 } + ], + "description": "Digitales Line‑Out (DL) gibt eine verlustfreie Audio‑Ausgabe über USB." + }, + { + "externalId": "Kassette_CAS-007", + "productGroupLabel": "Kassette", + "label": "CAS-007", + "properties": [ + { "property": "Spannungsversorgung (V)", "value": 230 }, + { "property": "Leistung (W)", "value": 26 }, + { "property": "Kapazität/Volumen (L)", "value": 0 }, + { "property": "Abmessungen (mm)", "value": "330x230x130" }, + { "property": "Gewicht (kg)", "value": 4 }, + { "property": "Energieeffizienzklasse", "value": "" }, + { "property": "Bedienungsart", "value": "RCA+Bluetooth+DL" }, + { "property": "Material Innenraum", "value": "" }, + { "property": "Zusatzfunktionen", "value": "" }, + { "property": "Preis (USD)", "value": 190 } + ], + "description": "Dreifach‑Anschluss (RCA, Bluetooth, DL) – maximale Flexibilität für jeden Nutzer." + }, + { + "externalId": "Kassette_CAS-008", + "productGroupLabel": "Kassette", + "label": "CAS-008", + "properties": [ + { "property": "Spannungsversorgung (V)", "value": 220 }, + { "property": "Leistung (W)", "value": 26 }, + { "property": "Kapazität/Volumen (L)", "value": 0 }, + { "property": "Abmessungen (mm)", "value": "335x235x135" }, + { "property": "Gewicht (kg)", "value": 4 }, + { "property": "Energieeffizienzklasse", "value": "" }, + { "property": "Bedienungsart", "value": "RCA+Wi‑Fi+DL" }, + { "property": "Material Innenraum", "value": "" }, + { "property": "Zusatzfunktionen", "value": "" }, + { "property": "Preis (USD)", "value": 200 } + ], + "description": "Kombiniert Wi‑Fi‑Streaming und digitale Ausgabe – perfekt für moderne Hi‑Fi‑Systeme." + }, + { + "externalId": "Kassette_CAS-009", + "productGroupLabel": "Kassette", + "label": "CAS-009", + "properties": [ + { "property": "Spannungsversorgung (V)", "value": 230 }, + { "property": "Leistung (W)", "value": 28 }, + { "property": "Kapazität/Volumen (L)", "value": 0 }, + { "property": "Abmessungen (mm)", "value": "340x240x140" }, + { "property": "Gewicht (kg)", "value": 4 }, + { "property": "Energieeffizienzklasse", "value": "" }, + { "property": "Bedienungsart", "value": "RCA+Bluetooth+Wi‑Fi" }, + { "property": "Material Innenraum", "value": "" }, + { "property": "Zusatzfunktionen", "value": "" }, + { "property": "Preis (USD)", "value": 210 } + ], + "description": "Vielseitiges Deck für das digitale Zeitalter – Stream, Bluetooth und klassische Kassetten." + }, + { + "externalId": "Kassette_CAS-010", + "productGroupLabel": "Kassette", + "label": "CAS-010", + "properties": [ + { "property": "Spannungsversorgung (V)", "value": 220 }, + { "property": "Leistung (W)", "value": 28 }, + { "property": "Kapazität/Volumen (L)", "value": 0 }, + { "property": "Abmessungen (mm)", "value": "345x245x145" }, + { "property": "Gewicht (kg)", "value": 4 }, + { "property": "Energieeffizienzklasse", "value": "" }, + { "property": "Bedienungsart", "value": "RCA+DL+Wi‑Fi" }, + { "property": "Material Innenraum", "value": "" }, + { "property": "Zusatzfunktionen", "value": "" }, + { "property": "Preis (USD)", "value": 220 } + ], + "description": "Modernes Kassetten‑Deck, das sich nahtlos in ein WLAN‑netzwerk einbinden lässt." + }, + + { + "externalId": "Verstärker_AMP-001", + "productGroupLabel": "Verstärker", + "label": "AMP-001", + "properties": [ + { "property": "Spannungsversorgung (V)", "value": 230 }, + { "property": "Leistung (W)", "value": 50 }, + { "property": "Kapazität/Volumen (L)", "value": 0 }, + { "property": "Abmessungen (mm)", "value": "400x300x120" }, + { "property": "Gewicht (kg)", "value": 6 }, + { "property": "Energieeffizienzklasse", "value": "" }, + { "property": "Bedienungsart", "value": "RCA+XLR" }, + { "property": "Material Innenraum", "value": "" }, + { "property": "Zusatzfunktionen", "value": "" }, + { "property": "Preis (USD)", "value": 280 } + ], + "description": "Kompakter Stereo‑Verstärker mit analogen RCA‑ und XLR‑Eingängen, perfekt für Hi‑Fi‑Anfänger." + }, + { + "externalId": "Verstärker_AMP-002", + "productGroupLabel": "Verstärker", + "label": "AMP-002", + "properties": [ + { "property": "Spannungsversorgung (V)", "value": 230 }, + { "property": "Leistung (W)", "value": 60 }, + { "property": "Kapazität/Volumen (L)", "value": 0 }, + { "property": "Abmessungen (mm)", "value": "405x305x125" }, + { "property": "Gewicht (kg)", "value": 6 }, + { "property": "Energieeffizienzklasse", "value": "" }, + { "property": "Bedienungsart", "value": "RCA+XLR+USB" }, + { "property": "Material Innenraum", "value": "" }, + { "property": "Zusatzfunktionen", "value": "" }, + { "property": "Preis (USD)", "value": 300 } + ], + "description": "Erweiterter Verstärker mit USB‑Audio‑Interface – ideal für digitale Quellen." + }, + { + "externalId": "Verstärker_AMP-003", + "productGroupLabel": "Verstärker", + "label": "AMP-003", + "properties": [ + { "property": "Spannungsversorgung (V)", "value": 230 }, + { "property": "Leistung (W)", "value": 70 }, + { "property": "Kapazität/Volumen (L)", "value": 0 }, + { "property": "Abmessungen (mm)", "value": "410x310x130" }, + { "property": "Gewicht (kg)", "value": 6 }, + { "property": "Energieeffizienzklasse", "value": "" }, + { "property": "Bedienungsart", "value": "RCA+XLR+Bluetooth" }, + { "property": "Material Innenraum", "value": "" }, + { "property": "Zusatzfunktionen", "value": "" }, + { "property": "Preis (USD)", "value": 320 } + ], + "description": "Bluetooth‑fähiger Verstärker, unterstützt kabelloses Streaming von Smartphones." + }, + { + "externalId": "Verstärker_AMP-004", + "productGroupLabel": "Verstärker", + "label": "AMP-004", + "properties": [ + { "property": "Spannungsversorgung (V)", "value": 230 }, + { "property": "Leistung (W)", "value": 80 }, + { "property": "Kapazität/Volumen (L)", "value": 0 }, + { "property": "Abmessungen (mm)", "value": "415x315x135" }, + { "property": "Gewicht (kg)", "value": 6 }, + { "property": "Energieeffizienzklasse", "value": "" }, + { "property": "Bedienungsart", "value": "RCA+XLR+Wi‑Fi" }, + { "property": "Material Innenraum", "value": "" }, + { "property": "Zusatzfunktionen", "value": "" }, + { "property": "Preis (USD)", "value": 340 } + ], + "description": "Mit integriertem Wi‑Fi für Netzwerk‑Audio (DLNA, AirPlay)." + }, + { + "externalId": "Verstärker_AMP-005", + "productGroupLabel": "Verstärker", + "label": "AMP-005", + "properties": [ + { "property": "Spannungsversorgung (V)", "value": 230 }, + { "property": "Leistung (W)", "value": 90 }, + { "property": "Kapazität/Volumen (L)", "value": 0 }, + { "property": "Abmessungen (mm)", "value": "420x320x140" }, + { "property": "Gewicht (kg)", "value": 6 }, + { "property": "Energieeffizienzklasse", "value": "" }, + { "property": "Bedienungsart", "value": "RCA+XLR+DL" }, + { "property": "Material Innenraum", "value": "" }, + { "property": "Zusatzfunktionen", "value": "" }, + { "property": "Preis (USD)", "value": 360 } + ], + "description": "Direkt‑Digital‑Line‑Out (DL) ermöglicht verlustfreie Aufnahmen via USB." + }, + { + "externalId": "Verstärker_AMP-006", + "productGroupLabel": "Verstärker", + "label": "AMP-006", + "properties": [ + { "property": "Spannungsversorgung (V)", "value": 230 }, + { "property": "Leistung (W)", "value": 100 }, + { "property": "Kapazität/Volumen (L)", "value": 0 }, + { "property": "Abmessungen (mm)", "value": "425x325x145" }, + { "property": "Gewicht (kg)", "value": 6 }, + { "property": "Energieeffizienzklasse", "value": "" }, + { "property": "Bedienungsart", "value": "RCA+XLR+Bluetooth+DL" }, + { "property": "Material Innenraum", "value": "" }, + { "property": "Zusatzfunktionen", "value": "" }, + { "property": "Preis (USD)", "value": 380 } + ], + "description": "All‑In‑One‑Verstärker mit Bluetooth‑, Wi‑Fi‑ und Digital‑Line‑Out." + }, + { + "externalId": "Verstärker_AMP-007", + "productGroupLabel": "Verstärker", + "label": "AMP-007", + "properties": [ + { "property": "Spannungsversorgung (V)", "value": 230 }, + { "property": "Leistung (W)", "value": 110 }, + { "property": "Kapazität/Volumen (L)", "value": 0 }, + { "property": "Abmessungen (mm)", "value": "430x330x150" }, + { "property": "Gewicht (kg)", "value": 6 }, + { "property": "Energieeffizienzklasse", "value": "" }, + { "property": "Bedienungsart", "value": "RCA+XLR+Wi‑Fi+DL" }, + { "property": "Material Innenraum", "value": "" }, + { "property": "Zusatzfunktionen", "value": "" }, + { "property": "Preis (USD)", "value": 400 } + ], + "description": "Premium‑Verstärker mit WLAN‑Streaming & digitaler Ausgangsbuchse." + }, + { + "externalId": "Verstärker_AMP-008", + "productGroupLabel": "Verstärker", + "label": "AMP-008", + "properties": [ + { "property": "Spannungsversorgung (V)", "value": 230 }, + { "property": "Leistung (W)", "value": 120 }, + { "property": "Kapazität/Volumen (L)", "value": 0 }, + { "property": "Abmessungen (mm)", "value": "435x335x155" }, + { "property": "Gewicht (kg)", "value": 6 }, + { "property": "Energieeffizienzklasse", "value": "" }, + { "property": "Bedienungsart", "value": "RCA+XLR+Bluetooth+Wi‑Fi" }, + { "property": "Material Innenraum", "value": "" }, + { "property": "Zusatzfunktionen", "value": "" }, + { "property": "Preis (USD)", "value": 420 } + ], + "description": "Voll ausgestattet – Bluetooth, Wi‑Fi und hochwertige XLR‑Eingänge." + }, + { + "externalId": "Verstärker_AMP-009", + "productGroupLabel": "Verstärker", + "label": "AMP-009", + "properties": [ + { "property": "Spannungsversorgung (V)", "value": 230 }, + { "property": "Leistung (W)", "value": 130 }, + { "property": "Kapazität/Volumen (L)", "value": 0 }, + { "property": "Abmessungen (mm)", "value": "440x340x160" }, + { "property": "Gewicht (kg)", "value": 6 }, + { "property": "Energieeffizienzklasse", "value": "" }, + { "property": "Bedienungsart", "value": "RCA+XLR+DL+Wi‑Fi" }, + { "property": "Material Innenraum", "value": "" }, + { "property": "Zusatzfunktionen", "value": "" }, + { "property": "Preis (USD)", "value": 440 } + ], + "description": "Leistungsstarker Verstärker mit Netzwerk‑ und D/A‑Konverter." + }, + { + "externalId": "Verstärker_AMP-010", + "productGroupLabel": "Verstärker", + "label": "AMP-010", + "properties": [ + { "property": "Spannungsversorgung (V)", "value": 230 }, + { "property": "Leistung (W)", "value": 140 }, + { "property": "Kapazität/Volumen (L)", "value": 0 }, + { "property": "Abmessungen (mm)", "value": "445x345x165" }, + { "property": "Gewicht (kg)", "value": 6 }, + { "property": "Energieeffizienzklasse", "value": "" }, + { "property": "Bedienungsart", "value": "RCA+XLR+Bluetooth+DL+Wi‑Fi" }, + { "property": "Material Innenraum", "value": "" }, + { "property": "Zusatzfunktionen", "value": "" }, + { "property": "Preis (USD)", "value": 460 } + ], + "description": "Flaggschiff‑Verstärker mit allen gängigen digitalen und analogen Anschlüssen." + }, + + { + "externalId": "CD‑Player_CDP-001", + "productGroupLabel": "CD‑Player", + "label": "CDP-001", + "properties": [ + { "property": "Spannungsversorgung (V)", "value": 220 }, + { "property": "Leistung (W)", "value": 0 }, + { "property": "Kapazität/Volumen (L)", "value": 0 }, + { "property": "Abmessungen (mm)", "value": "250x200x90" }, + { "property": "Gewicht (kg)", "value": 3 }, + { "property": "Energieeffizienzklasse", "value": "" }, + { "property": "Bedienungsart", "value": "RCA+USB" }, + { "property": "Material Innenraum", "value": "" }, + { "property": "Zusatzfunktionen", "value": "" }, + { "property": "Preis (USD)", "value": 210 } + ], + "description": "Einfacher CD‑Player mit USB‑Eingang für digitale Musikdateien." + }, + { + "externalId": "CD‑Player_CDP-002", + "productGroupLabel": "CD‑Player", + "label": "CDP-002", + "properties": [ + { "property": "Spannungsversorgung (V)", "value": 220 }, + { "property": "Leistung (W)", "value": 0 }, + { "property": "Kapazität/Volumen (L)", "value": 0 }, + { "property": "Abmessungen (mm)", "value": "255x205x95" }, + { "property": "Gewicht (kg)", "value": 3 }, + { "property": "Energieeffizienzklasse", "value": "" }, + { "property": "Bedienungsart", "value": "RCA+Bluetooth" }, + { "property": "Material Innenraum", "value": "" }, + { "property": "Zusatzfunktionen", "value": "" }, + { "property": "Preis (USD)", "value": 225 } + ], + "description": "Bluetooth‑Verbindung zum kabellosen Abspielen auf Lautsprecher." + }, + { + "externalId": "CD‑Player_CDP-003", + "productGroupLabel": "CD‑Player", + "label": "CDP-003", + "properties": [ + { "property": "Spannungsversorgung (V)", "value": 230 }, + { "property": "Leistung (W)", "value": 0 }, + { "property": "Kapazität/Volumen (L)", "value": 0 }, + { "property": "Abmessungen (mm)", "value": "260x210x100" }, + { "property": "Gewicht (kg)", "value": 3 }, + { "property": "Energieeffizienzklasse", "value": "" }, + { "property": "Bedienungsart", "value": "RCA+Wi‑Fi" }, + { "property": "Material Innenraum", "value": "" }, + { "property": "Zusatzfunktionen", "value": "" }, + { "property": "Preis (USD)", "value": 240 } + ], + "description": "Wi‑Fi‑Modul ermöglicht das Streamen über Netzwerk‑Bibliotheken." + }, + { + "externalId": "CD‑Player_CDP-004", + "productGroupLabel": "CD‑Player", + "label": "CDP-004", + "properties": [ + { "property": "Spannungsversorgung (V)", "value": 220 }, + { "property": "Leistung (W)", "value": 0 }, + { "property": "Kapazität/Volumen (L)", "value": 0 }, + { "property": "Abmessungen (mm)", "value": "265x215x105" }, + { "property": "Gewicht (kg)", "value": 3 }, + { "property": "Energieeffizienzklasse", "value": "" }, + { "property": "Bedienungsart", "value": "RCA+DL" }, + { "property": "Material Innenraum", "value": "" }, + { "property": "Zusatzfunktionen", "value": "" }, + { "property": "Preis (USD)", "value": 255 } + ], + "description": "Digital‑Line‑Out für eine verlustfreie Verbindung zu Aufnahmegeräten." + }, + { + "externalId": "CD‑Player_CDP-005", + "productGroupLabel": "CD‑Player", + "label": "CDP-005", + "properties": [ + { "property": "Spannungsversorgung (V)", "value": 230 }, + { "property": "Leistung (W)", "value": 0 }, + { "property": "Kapazität/Volumen (L)", "value": 0 }, + { "property": "Abmessungen (mm)", "value": "270x220x110" }, + { "property": "Gewicht (kg)", "value": 3 }, + { "property": "Energieeffizienzklasse", "value": "" }, + { "property": "Bedienungsart", "value": "RCA+Bluetooth+DL" }, + { "property": "Material Innenraum", "value": "" }, + { "property": "Zusatzfunktionen", "value": "" }, + { "property": "Preis (USD)", "value": 270 } + ], + "description": "Kombination aus Bluetooth‑Streaming und Digital‑Line‑Out." + }, + { + "externalId": "CD‑Player_CDP-006", + "productGroupLabel": "CD‑Player", + "label": "CDP-006", + "properties": [ + { "property": "Spannungsversorgung (V)", "value": 220 }, + { "property": "Leistung (W)", "value": 0 }, + { "property": "Kapazität/Volumen (L)", "value": 0 }, + { "property": "Abmessungen (mm)", "value": "275x225x115" }, + { "property": "Gewicht (kg)", "value": 3 }, + { "property": "Energieeffizienzklasse", "value": "" }, + { "property": "Bedienungsart", "value": "RCA+Wi‑Fi+DL" }, + { "property": "Material Innenraum", "value": "" }, + { "property": "Zusatzfunktionen", "value": "" }, + { "property": "Preis (USD)", "value": 285 } + ], + "description": "Wi‑Fi‑Streaming + Digital‑Ausgang – für Hi‑Fi‑Setups." + }, + { + "externalId": "CD‑Player_CDP-007", + "productGroupLabel": "CD‑Player", + "label": "CDP-007", + "properties": [ + { "property": "Spannungsversorgung (V)", "value": 230 }, + { "property": "Leistung (W)", "value": 0 }, + { "property": "Kapazität/Volumen (L)", "value": 0 }, + { "property": "Abmessungen (mm)", "value": "280x230x120" }, + { "property": "Gewicht (kg)", "value": 3 }, + { "property": "Energieeffizienzklasse", "value": "" }, + { "property": "Bedienungsart", "value": "RCA+Bluetooth+Wi‑Fi" }, + { "property": "Material Innenraum", "value": "" }, + { "property": "Zusatzfunktionen", "value": "" }, + { "property": "Preis (USD)", "value": 300 } + ], + "description": "All‑In‑One‑CD‑Player – Bluetooth, Wi‑Fi und klassische RCA‑Ausgaben." + }, + { + "externalId": "CD‑Player_CDP-008", + "productGroupLabel": "CD‑Player", + "label": "CDP-008", + "properties": [ + { "property": "Spannungsversorgung (V)", "value": 220 }, + { "property": "Leistung (W)", "value": 0 }, + { "property": "Kapazität/Volumen (L)", "value": 0 }, + { "property": "Abmessungen (mm)", "value": "285x235x125" }, + { "property": "Gewicht (kg)", "value": 3 }, + { "property": "Energieeffizienzklasse", "value": "" }, + { "property": "Bedienungsart", "value": "RCA+DL+Wi‑Fi" }, + { "property": "Material Innenraum", "value": "" }, + { "property": "Zusatzfunktionen", "value": "" }, + { "property": "Preis (USD)", "value": 315 } + ], + "description": "Digital‑Line‑Out plus WLAN‑Streaming für die vernetzte Musikanlage." + }, + { + "externalId": "CD‑Player_CDP-009", + "productGroupLabel": "CD‑Player", + "label": "CDP-009", + "properties": [ + { "property": "Spannungsversorgung (V)", "value": 230 }, + { "property": "Leistung (W)", "value": 0 }, + { "property": "Kapazität/Volumen (L)", "value": 0 }, + { "property": "Abmessungen (mm)", "value": "290x240x130" }, + { "property": "Gewicht (kg)", "value": 3 }, + { "property": "Energieeffizienzklasse", "value": "" }, + { "property": "Bedienungsart", "value": "RCA+Bluetooth+DL+Wi‑Fi" }, + { "property": "Material Innenraum", "value": "" }, + { "property": "Zusatzfunktionen", "value": "" }, + { "property": "Preis (USD)", "value": 330 } + ], + "description": "Voll ausgestatteter CD‑Player, bereit für jede digitale Verbindung." + }, + { + "externalId": "CD‑Player_CDP-010", + "productGroupLabel": "CD‑Player", + "label": "CDP-010", + "properties": [ + { "property": "Spannungsversorgung (V)", "value": 220 }, + { "property": "Leistung (W)", "value": 0 }, + { "property": "Kapazität/Volumen (L)", "value": 0 }, + { "property": "Abmessungen (mm)", "value": "295x245x135" }, + { "property": "Gewicht (kg)", "value": 3 }, + { "property": "Energieeffizienzklasse", "value": "" }, + { "property": "Bedienungsart", "value": "RCA+USB+Bluetooth" }, + { "property": "Material Innenraum", "value": "" }, + { "property": "Zusatzfunktionen", "value": "" }, + { "property": "Preis (USD)", "value": 345 } + ], + "description": "USB‑Mediendatenbank, Bluetooth‑Ausgabe – Alles in einem kompakten Gehäuse." + } + ] }, { "label": "Machines", - "description": "All machines products" + "description": "All machines products", + "products": [ + { + "externalId": "Waschmaschine_WAS-001", + "productGroupLabel": "Waschmaschine", + "label": "WAS-001", + "description": "Kompakte Frontlader‑Waschmaschine mit Energiespar‑Quick‑Wash für kleine Haushalte.", + "properties": [ + { "property": "Spannungsversorgung (V)", "value": 220 }, + { "property": "Leistung (W)", "value": 2000 }, + { "property": "Kapazität (kg)", "value": 6 }, + { "property": "Energieeffizienzklasse", "value": "A++" }, + { "property": "Schleuderdrehzahl (U/min)", "value": 1200 }, + { "property": "Programms/Features", "value": "Quick‑Wash;Eco‑Mode" }, + { "property": "Wasserverbrauch pro Zyklus (L)", "value": 45 }, + { "property": "Abmessungen (mm)", "value": "600x850x550" }, + { "property": "Gewicht (kg)", "value": 70 }, + { "property": "Preis (USD)", "value": 500 } + ] + }, + { + "externalId": "Waschmaschine_WAS-002", + "productGroupLabel": "Waschmaschine", + "label": "WAS-002", + "description": "Intelligente Waschmaschine mit Dampffunktion für allergiker‑freundliches Waschen.", + "properties": [ + { "property": "Spannungsversorgung (V)", "value": 230 }, + { "property": "Leistung (W)", "value": 2100 }, + { "property": "Kapazität (kg)", "value": 7 }, + { "property": "Energieeffizienzklasse", "value": "A+" }, + { "property": "Schleuderdrehzahl (U/min)", "value": 1400 }, + { "property": "Programms/Features", "value": "Intelli‑Wash;Steam" }, + { "property": "Wasserverbrauch pro Zyklus (L)", "value": 50 }, + { "property": "Abmessungen (mm)", "value": "610x860x560" }, + { "property": "Gewicht (kg)", "value": 75 }, + { "property": "Preis (USD)", "value": 550 } + ] + }, + { + "externalId": "Waschmaschine_WAS-003", + "productGroupLabel": "Waschmaschine", + "label": "WAS-003", + "description": "App‑Steuerung ermöglicht Zeitvorwahl und Fernüberwachung über das Smartphone.", + "properties": [ + { "property": "Spannungsversorgung (V)", "value": 220 }, + { "property": "Leistung (W)", "value": 2200 }, + { "property": "Kapazität (kg)", "value": 8 }, + { "property": "Energieeffizienzklasse", "value": "A++" }, + { "property": "Schleuderdrehzahl (U/min)", "value": 1600 }, + { "property": "Programms/Features", "value": "Smart‑App;Delay‑Start" }, + { "property": "Wasserverbrauch pro Zyklus (L)", "value": 55 }, + { "property": "Abmessungen (mm)", "value": "620x870x570" }, + { "property": "Gewicht (kg)", "value": 80 }, + { "property": "Preis (USD)", "value": 600 } + ] + }, + { + "externalId": "Waschmaschine_WAS-004", + "productGroupLabel": "Waschmaschine", + "label": "WAS-004", + "description": "Allergy‑Programm reduziert Allergene, Auto‑Dose dosiert Waschmittel automatisch.", + "properties": [ + { "property": "Spannungsversorgung (V)", "value": 230 }, + { "property": "Leistung (W)", "value": 2300 }, + { "property": "Kapazität (kg)", "value": 9 }, + { "property": "Energieeffizienzklasse", "value": "A+" }, + { "property": "Schleuderdrehzahl (U/min)", "value": 1800 }, + { "property": "Programms/Features", "value": "Allergy;Auto‑Dose" }, + { "property": "Wasserverbrauch pro Zyklus (L)", "value": 60 }, + { "property": "Abmessungen (mm)", "value": "630x880x580" }, + { "property": "Gewicht (kg)", "value": 85 }, + { "property": "Preis (USD)", "value": 650 } + ] + }, + { + "externalId": "Waschmaschine_WAS-005", + "productGroupLabel": "Waschmaschine", + "label": "WAS-005", + "description": "Schnell‑Wäsche plus Dampf‑Frisch‑Funktion, besonders leiser Betrieb.", + "properties": [ + { "property": "Spannungsversorgung (V)", "value": 220 }, + { "property": "Leistung (W)", "value": 2400 }, + { "property": "Kapazität (kg)", "value": 10 }, + { "property": "Energieeffizienzklasse", "value": "A++" }, + { "property": "Schleuderdrehzahl (U/min)", "value": 2000 }, + { "property": "Programms/Features", "value": "Quick‑Wash+Steam;Eco‑Silence" }, + { "property": "Wasserverbrauch pro Zyklus (L)", "value": 65 }, + { "property": "Abmessungen (mm)", "value": "640x890x590" }, + { "property": "Gewicht (kg)", "value": 90 }, + { "property": "Preis (USD)", "value": 700 } + ] + }, + { + "externalId": "Waschmaschine_WAS-006", + "productGroupLabel": "Waschmaschine", + "label": "WAS-006", + "description": "WLAN‑Steuerung und Dampffrischer für schnell frische Wäsche.", + "properties": [ + { "property": "Spannungsversorgung (V)", "value": 230 }, + { "property": "Leistung (W)", "value": 2500 }, + { "property": "Kapazität (kg)", "value": 11 }, + { "property": "Energieeffizienzklasse", "value": "A+" }, + { "property": "Schleuderdrehzahl (U/min)", "value": 2200 }, + { "property": "Programms/Features", "value": "Wi‑Fi‑Control;Steam‑Refresh" }, + { "property": "Wasserverbrauch pro Zyklus (L)", "value": 70 }, + { "property": "Abmessungen (mm)", "value": "650x900x600" }, + { "property": "Gewicht (kg)", "value": 95 }, + { "property": "Preis (USD)", "value": 750 } + ] + }, + { + "externalId": "Waschmaschine_WAS-007", + "productGroupLabel": "Waschmaschine", + "label": "WAS-007", + "description": "Wärmepumpentechnologie senkt Energieverbrauch, Auto‑Dose sorgt für optimale Dosierung.", + "properties": [ + { "property": "Spannungsversorgung (V)", "value": 220 }, + { "property": "Leistung (W)", "value": 2600 }, + { "property": "Kapazität (kg)", "value": 12 }, + { "property": "Energieeffizienzklasse", "value": "A++" }, + { "property": "Schleuderdrehzahl (U/min)", "value": 2400 }, + { "property": "Programms/Features", "value": "Auto‑Dose;Heat‑Pump" }, + { "property": "Wasserverbrauch pro Zyklus (L)", "value": 75 }, + { "property": "Abmessungen (mm)", "value": "660x910x610" }, + { "property": "Gewicht (kg)", "value": 100 }, + { "property": "Preis (USD)", "value": 800 } + ] + }, + { + "externalId": "Waschmaschine_WAS-008", + "productGroupLabel": "Waschmaschine", + "label": "WAS-008", + "description": "Intelligenter Sensor erkennt Beladungsmenge und passt Wasserverbrauch an.", + "properties": [ + { "property": "Spannungsversorgung (V)", "value": 230 }, + { "property": "Leistung (W)", "value": 2700 }, + { "property": "Kapazität (kg)", "value": 13 }, + { "property": "Energieeffizienzklasse", "value": "A+" }, + { "property": "Schleuderdrehzahl (U/min)", "value": 2600 }, + { "property": "Programms/Features", "value": "Intelli‑Sensor;Quick‑Wash" }, + { "property": "Wasserverbrauch pro Zyklus (L)", "value": 80 }, + { "property": "Abmessungen (mm)", "value": "670x920x620" }, + { "property": "Gewicht (kg)", "value": 105 }, + { "property": "Preis (USD)", "value": 850 } + ] + }, + { + "externalId": "Waschmaschine_WAS-009", + "productGroupLabel": "Waschmaschine", + "label": "WAS-009", + "description": "Dampf‑Sanitisierung tötet Bakterien; Zeitverzögerer für flexiblen Start.", + "properties": [ + { "property": "Spannungsversorgung (V)", "value": 220 }, + { "property": "Leistung (W)", "value": 2800 }, + { "property": "Kapazität (kg)", "value": 14 }, + { "property": "Energieeffizienzklasse", "value": "A++" }, + { "property": "Schleuderdrehzahl (U/min)", "value": 2800 }, + { "property": "Programms/Features", "value": "Steam‑Sanitize;Time‑Delay" }, + { "property": "Wasserverbrauch pro Zyklus (L)", "value": 85 }, + { "property": "Abmessungen (mm)", "value": "680x930x630" }, + { "property": "Gewicht (kg)", "value": 110 }, + { "property": "Preis (USD)", "value": 900 } + ] + }, + { + "externalId": "Waschmaschine_WAS-010", + "productGroupLabel": "Waschmaschine", + "label": "WAS-010", + "description": "Smart‑Home‑Integration (Alexa, Google Home) + Turbo‑Eco‑Programm für schnelle, sparsame Wäsche.", + "properties": [ + { "property": "Spannungsversorgung (V)", "value": 230 }, + { "property": "Leistung (W)", "value": 2900 }, + { "property": "Kapazität (kg)", "value": 15 }, + { "property": "Energieeffizienzklasse", "value": "A+" }, + { "property": "Schleuderdrehzahl (U/min)", "value": 3000 }, + { "property": "Programms/Features", "value": "Smart‑Home;Eco‑Turbo" }, + { "property": "Wasserverbrauch pro Zyklus (L)", "value": 90 }, + { "property": "Abmessungen (mm)", "value": "690x940x640" }, + { "property": "Gewicht (kg)", "value": 115 }, + { "property": "Preis (USD)", "value": 950 } + ] + }, + { + "externalId": "Trockner_TRO-001", + "productGroupLabel": "Trockner", + "label": "TRO-001", + "description": "Kompakter Wärmepumpentrockner, schont Textilien und spart Energie.", + "properties": [ + { "property": "Spannungsversorgung (V)", "value": 220 }, + { "property": "Leistung (W)", "value": 2100 }, + { "property": "Kapazität (kg)", "value": 6 }, + { "property": "Energieeffizienzklasse", "value": "A++" }, + { "property": "Schleuderdrehzahl (U/min)", "value": 1200 }, + { "property": "Programms/Features", "value": "Heat‑Pump;Anti‑Wrinkle" }, + { "property": "Wasserverbrauch pro Zyklus (L)", "value": 0 }, + { "property": "Abmessungen (mm)", "value": "600x850x550" }, + { "property": "Gewicht (kg)", "value": 70 }, + { "property": "Preis (USD)", "value": 520 } + ] + }, + { + "externalId": "Trockner_TRO-002", + "productGroupLabel": "Trockner", + "label": "TRO-002", + "description": "Kondensationstrockner mit Dampffrisch‑Programm, reduziert Knittrigkeit um 30 %.", + "properties": [ + { "property": "Spannungsversorgung (V)", "value": 230 }, + { "property": "Leistung (W)", "value": 2200 }, + { "property": "Kapazität (kg)", "value": 7 }, + { "property": "Energieeffizienzklasse", "value": "A+" }, + { "property": "Schleuderdrehzahl (U/min)", "value": 1400 }, + { "property": "Programms/Features", "value": "Condensation;SteamRefresh" }, + { "property": "Wasserverbrauch pro Zyklus (L)", "value": 0 }, + { "property": "Abmessungen (mm)", "value": "610x860x560" }, + { "property": "Gewicht (kg)", "value": 75 }, + { "property": "Preis (USD)", "value": 570 } + ] + }, + { + "externalId": "Trockner_TRO-003", + "productGroupLabel": "Trockner", + "label": "TRO-003", + "description": "Smart‑App‑Steuerung, schnelles Trocknen für eilige Haushalte.", + "properties": [ + { "property": "Spannungsversorgung (V)", "value": 220 }, + { "property": "Leistung (W)", "value": 2300 }, + { "property": "Kapazität (kg)", "value": 8 }, + { "property": "Energieeffizienzklasse", "value": "A++" }, + { "property": "Schleuderdrehzahl (U/min)", "value": 1600 }, + { "property": "Programms/Features", "value": "Smart‑App;Quick‑Dry" }, + { "property": "Wasserverbrauch pro Zyklus (L)", "value": 0 }, + { "property": "Abmessungen (mm)", "value": "620x870x570" }, + { "property": "Gewicht (kg)", "value": 80 }, + { "property": "Preis (USD)", "value": 620 } + ] + }, + { + "externalId": "Trockner_TRO-004", + "productGroupLabel": "Trockner", + "label": "TRO-004", + "description": "Feuchtigkeitssensor passt Trockenzeit an, Bambus‑Filter für Geruchsnutzung.", + "properties": [ + { "property": "Spannungsversorgung (V)", "value": 230 }, + { "property": "Leistung (W)", "value": 2400 }, + { "property": "Kapazität (kg)", "value": 9 }, + { "property": "Energieeffizienzklasse", "value": "A+" }, + { "property": "Schleuderdrehzahl (U/min)", "value": 1800 }, + { "property": "Programms/Features", "value": "Sensor‑Dry;Bamboo‑Filter" }, + { "property": "Wasserverbrauch pro Zyklus (L)", "value": 0 }, + { "property": "Abmessungen (mm)", "value": "630x880x580" }, + { "property": "Gewicht (kg)", "value": 85 }, + { "property": "Preis (USD)", "value": 670 } + ] + }, + { + "externalId": "Trockner_TRO-005", + "productGroupLabel": "Trockner", + "label": "TRO-005", + "description": "Wärmepumpe + Dampffunktion für schonendes, energieeffizientes Trocknen.", + "properties": [ + { "property": "Spannungsversorgung (V)", "value": 220 }, + { "property": "Leistung (W)", "value": 2500 }, + { "property": "Kapazität (kg)", "value": 10 }, + { "property": "Energieeffizienzklasse", "value": "A++" }, + { "property": "Schleuderdrehzahl (U/min)", "value": 2000 }, + { "property": "Programms/Features", "value": "Heat‑Pump+Steam;Eco‑Mode" }, + { "property": "Wasserverbrauch pro Zyklus (L)", "value": 0 }, + { "property": "Abmessungen (mm)", "value": "640x890x590" }, + { "property": "Gewicht (kg)", "value": 90 }, + { "property": "Preis (USD)", "value": 720 } + ] + }, + { + "externalId": "Trockner_TRO-006", + "productGroupLabel": "Trockner", + "label": "TRO-006", + "description": "WLAN‑Steuerung, automatischer Lint‑Filter‑Reinigungszyklus.", + "properties": [ + { "property": "Spannungsversorgung (V)", "value": 230 }, + { "property": "Leistung (W)", "value": 2600 }, + { "property": "Kapazität (kg)", "value": 11 }, + { "property": "Energieeffizienzklasse", "value": "A+" }, + { "property": "Schleuderdrehzahl (U/min)", "value": 2200 }, + { "property": "Programms/Features", "value": "Wi‑Fi‑Control;Auto‑Clean" }, + { "property": "Wasserverbrauch pro Zyklus (L)", "value": 0 }, + { "property": "Abmessungen (mm)", "value": "650x900x600" }, + { "property": "Gewicht (kg)", "value": 95 }, + { "property": "Preis (USD)", "value": 770 } + ] + }, + { + "externalId": "Trockner_TRO-007", + "productGroupLabel": "Trockner", + "label": "TRO-007", + "description": "Auto‑Sense passt Programme auf Textilart an, schonendes Gentle‑Dry.", + "properties": [ + { "property": "Spannungsversorgung (V)", "value": 220 }, + { "property": "Leistung (W)", "value": 2700 }, + { "property": "Kapazität (kg)", "value": 12 }, + { "property": "Energieeffizienzklasse", "value": "A++" }, + { "property": "Schleuderdrehzahl (U/min)", "value": 2400 }, + { "property": "Programms/Features", "value": "Auto‑Sense;Gentle‑Dry" }, + { "property": "Wasserverbrauch pro Zyklus (L)", "value": 0 }, + { "property": "Abmessungen (mm)", "value": "660x910x610" }, + { "property": "Gewicht (kg)", "value": 100 }, + { "property": "Preis (USD)", "value": 820 } + ] + }, + { + "externalId": "Trockner_TRO-008", + "productGroupLabel": "Trockner", + "label": "TRO-008", + "description": "Schnell‑Trocknen mit antistatischer Entladung für weniger Knittern.", + "properties": [ + { "property": "Spannungsversorgung (V)", "value": 230 }, + { "property": "Leistung (W)", "value": 2800 }, + { "property": "Kapazität (kg)", "value": 13 }, + { "property": "Energieeffizienzklasse", "value": "A+" }, + { "property": "Schleuderdrehzahl (U/min)", "value": 2600 }, + { "property": "Programms/Features", "value": "Quick‑Dry;Anti‑Static" }, + { "property": "Wasserverbrauch pro Zyklus (L)", "value": 0 }, + { "property": "Abmessungen (mm)", "value": "670x920x620" }, + { "property": "Gewicht (kg)", "value": 105 }, + { "property": "Preis (USD)", "value": 870 } + ] + }, + { + "externalId": "Trockner_TRO-009", + "productGroupLabel": "Trockner", + "label": "TRO-009", + "description": "Dampfsanitierung tötet Bakterien, Zeitverzögerung für flexiblen Einsatz.", + "properties": [ + { "property": "Spannungsversorgung (V)", "value": 220 }, + { "property": "Leistung (W)", "value": 2900 }, + { "property": "Kapazität (kg)", "value": 14 }, + { "property": "Energieeffizienzklasse", "value": "A++" }, + { "property": "Schleuderdrehzahl (U/min)", "value": 2800 }, + { "property": "Programms/Features", "value": "Steam‑Sanitize;Time‑Delay" }, + { "property": "Wasserverbrauch pro Zyklus (L)", "value": 0 }, + { "property": "Abmessungen (mm)", "value": "680x930x630" }, + { "property": "Gewicht (kg)", "value": 110 }, + { "property": "Preis (USD)", "value": 920 } + ] + }, + { + "externalId": "Trockner_TRO-010", + "productGroupLabel": "Trockner", + "label": "TRO-010", + "description": "Smart‑Home‑Kompatibilität, Turbo‑Eco‑Modus für schnelle, energieeffiziente Trocknung.", + "properties": [ + { "property": "Spannungsversorgung (V)", "value": 230 }, + { "property": "Leistung (W)", "value": 3000 }, + { "property": "Kapazität (kg)", "value": 15 }, + { "property": "Energieeffizienzklasse", "value": "A+" }, + { "property": "Schleuderdrehzahl (U/min)", "value": 3000 }, + { "property": "Programms/Features", "value": "Smart‑Home;Eco‑Turbo" }, + { "property": "Wasserverbrauch pro Zyklus (L)", "value": 0 }, + { "property": "Abmessungen (mm)", "value": "690x940x640" }, + { "property": "Gewicht (kg)", "value": 115 }, + { "property": "Preis (USD)", "value": 970 } + ] + } + ] } ] }, diff --git a/buildtime/server/models/import.go b/buildtime/server/models/import.go index 4f1f77aa6..678166fe9 100644 --- a/buildtime/server/models/import.go +++ b/buildtime/server/models/import.go @@ -1,11 +1,11 @@ package models type ImportPropertyTypeGroup struct { - ID int `json:"id,omitempty"` - Label string `json:"label"` - Description string `json:"description"` - SubGroups []ImportPropertyTypeGroup `json:"subGroups,omitempty"` - PropertyTypes []ImportPropertyType `json:"propertyTypes,omitempty"` + ID int `json:"id,omitempty"` + Label string `json:"label"` + Description string `json:"description"` + PropertyTypeGroups []ImportPropertyTypeGroup `json:"propertyTypeGroups,omitempty"` + PropertyTypes []ImportPropertyType `json:"propertyTypes,omitempty"` } type ImportPropertyType struct { @@ -15,9 +15,9 @@ type ImportPropertyType struct { } type ImportProperty struct { - ID int `json:"id,omitempty"` - Label string `json:"label"` - Description string `json:"description"` + ID int `json:"id,omitempty"` + Label string `json:"label"` + Value string `json:"value"` } type ImportProductGroup struct { @@ -29,9 +29,9 @@ type ImportProductGroup struct { } type ImportProduct struct { - ID int `json:"id,omitempty"` - Label string `json:"label"` - Description string `json:"description"` - ProductGroupLabel string `json:"productGroupLabel, omitempty"` - Properties []ImportProperty `json:"properties,omitempty"` + ID int `json:"id,omitempty"` + Label string `json:"label"` + Description string `json:"description"` + ProductGroupLabel string `json:"productGroupLabel,omitempty"` + Properties []ImportProperty `json:"properties,omitempty"` } diff --git a/buildtime/server/repositories/importRepository.go b/buildtime/server/repositories/importRepository.go index 70325a7b7..0d8a349eb 100644 --- a/buildtime/server/repositories/importRepository.go +++ b/buildtime/server/repositories/importRepository.go @@ -37,8 +37,8 @@ func (r *ImportRepository) ImportPropertyTypeGroups(importData []models.ImportPr return err } // update subgroups if they exist - if data.SubGroups != nil { - return r.ImportPropertyTypeGroups(data.SubGroups) + if data.PropertyTypeGroups != nil { + return r.ImportPropertyTypeGroups(data.PropertyTypeGroups) } } else { // Insert new record @@ -46,8 +46,8 @@ func (r *ImportRepository) ImportPropertyTypeGroups(importData []models.ImportPr if err != nil { return err } - if data.SubGroups != nil { - return r.ImportPropertyTypeGroups(data.SubGroups) + if data.PropertyTypeGroups != nil { + return r.ImportPropertyTypeGroups(data.PropertyTypeGroups) } } } @@ -124,40 +124,79 @@ func (r *ImportRepository) ImportProducts(importData []models.ImportProduct, gro } func (r *ImportRepository) ImportProperties(importData []models.ImportProperty, productID int, groupID int) error { - // Implement the logic to import Properties into the database - for _, property := range importData { - query1 := "SELECT id FROM propertyTypes WHERE label = $1" - rows, err := r.db.Query(query1, property.Label) + propertyTypeID, err := r.findPropertyTypeID(property.Label) if err != nil { return err } - defer rows.Close() - var pti int - if rows.Next() { - if err := rows.Scan(&pti); err != nil { - return err - } - } - if property.ID != 0 { - // Update existing Property - query := "UPDATE properties SET label = $1, description = $2, propertyTypeId= $3, productId = $4, productGroupId =$5 WHERE id = $6" - _, err := r.db.Exec(query, property.Label, property.Description, pti, productID, groupID, property.ID) - if err != nil { + + propertyID := property.ID + if propertyID != 0 { + if err := r.updateProperty(property, propertyID, productID, groupID, propertyTypeID); err != nil { return err } } else { - // Insert new Property - query := "INSERT INTO properties (label, description, productId, propertyTypeId, productGroupId) VALUES ($1, $2, $3, $4, $5) RETURNING id" - err := r.db.QueryRow(query, property.Label, property.Description, productID, pti, groupID).Scan(&property.ID) + propertyID, err = r.insertProperty(property, productID, groupID, propertyTypeID) if err != nil { return err } } + + if err := r.upsertValue(propertyID, property.Value); err != nil { + return err + } + if err := r.upsertValue(propertyTypeID, property.Value); err != nil { + return err + } } return nil } +func (r *ImportRepository) findPropertyTypeID(label string) (int, error) { + var propertyTypeID int + err := r.db.QueryRow("SELECT id FROM propertyTypes WHERE label = $1", label).Scan(&propertyTypeID) + if err != nil { + if err == sql.ErrNoRows { + return 0, nil + } + return 0, err + } + + return propertyTypeID, nil +} + +func (r *ImportRepository) updateProperty(property models.ImportProperty, propertyID int, productID int, groupID int, propertyTypeID int) error { + query := "UPDATE properties SET label = $1, description = $2, propertyTypeId = $3, productId = $4, productGroupId = $5 WHERE id = $6" + _, err := r.db.Exec(query, property.Label, property.Label, propertyTypeID, productID, groupID, propertyID) + return err +} + +func (r *ImportRepository) insertProperty(property models.ImportProperty, productID int, groupID int, propertyTypeID int) (int, error) { + query := "INSERT INTO properties (label, description, productId, propertyTypeId, productGroupId) VALUES ($1, $2, $3, $4, $5) RETURNING id" + var propertyID int + err := r.db.QueryRow(query, property.Label, property.Label, productID, propertyTypeID, groupID).Scan(&propertyID) + if err != nil { + return 0, err + } + + return propertyID, nil +} + +func (r *ImportRepository) upsertValue(propertyID int, value string) error { + var existingValueID int + err := r.db.QueryRow("SELECT id FROM values WHERE label = $1 AND propertyId = $2", value, propertyID).Scan(&existingValueID) + if err != nil { + if err != sql.ErrNoRows { + return err + } + _, err = r.db.Exec("INSERT INTO values (label, description, propertyId) VALUES ($1, $2, $3)", value, "", propertyID) + return err + } + + _, err = r.db.Exec("UPDATE values SET label = $1, description = $2 WHERE id = $3", value, "", existingValueID) + return err +} + func (r *ImportRepository) ImportPropertyTypes(importData []models.ImportPropertyType, groupID int) error { for _, propertyType := range importData { if propertyType.ID != 0 { diff --git a/buildtime/server/server/httpServer.go b/buildtime/server/server/httpServer.go index f897d5df0..124a3b7f1 100644 --- a/buildtime/server/server/httpServer.go +++ b/buildtime/server/server/httpServer.go @@ -95,7 +95,7 @@ func InitHttpServer(config *viper.Viper, dbHandler *sql.DB) HttpServer { // Import functionality router.POST("/importPropertyTypeGroups", importController.ImportPropertyTypeGroups) // import PropertyTypeGroups router.POST("/importProductGroups", importController.ImportProductGroups) // import ProductGroups - router.POST("/importProducts", importController.ImportProducts) // import Products + // router.POST("/importProducts", importController.ImportProducts) // import Products // server return HttpServer{ diff --git a/buildtime/server/services/importService.go b/buildtime/server/services/importService.go index 1f6237b1c..e833d81d9 100644 --- a/buildtime/server/services/importService.go +++ b/buildtime/server/services/importService.go @@ -23,6 +23,8 @@ func (is *ImportService) ImportProductGroups(importData []models.ImportProductGr return is.importRepository.ImportProductGroups(importData) } +/* func (is *ImportService) ImportProducts(importData []models.ImportProduct) error { return is.importRepository.ImportProducts(importData) } +*/