From 76db8d4cfed9d249f12480d72cdcf914e3752e13 Mon Sep 17 00:00:00 2001 From: Thomas Sindt Date: Sat, 12 Sep 2026 23:09:17 +0200 Subject: [PATCH 1/3] Testdaten --- .../household_example/propertyTypeGroups.json | 308 ++++++++++++------ xcpq/buildtime/xcpq_editor/cmd/config.toml | 4 +- 2 files changed, 213 insertions(+), 99 deletions(-) diff --git a/buildtime/server/examples/household_example/propertyTypeGroups.json b/buildtime/server/examples/household_example/propertyTypeGroups.json index 87fbdab79..018952f79 100644 --- a/buildtime/server/examples/household_example/propertyTypeGroups.json +++ b/buildtime/server/examples/household_example/propertyTypeGroups.json @@ -1,97 +1,211 @@ -[{ - "label": "Simply CPQ", - "description": "Property Type Group for Simply CPQ", - "propertyTypeGroups": [ - { - "label": "electrical", - "description": "All electrical property types", - "propertyTypes": [ - { - "label": "Spannungsversorgung (V)", - "description": "Spannungsversorgung (V)" - }, - { - "label": "Leistung (W)", - "description": "Leistung" - }, - { - "label": "Eingangsimpedanz (Ω)", - "description": "Wiederstand der Eingangsimpedanz" - }, - { - "label": "Frequenzbereich (Hz‑kHz)", - "description": "Frequenzbereich (Hz‑kHz)" - }, - { - "label": "Signal‑Rausch‑Verhältnis (dB)", - "description": "Signal‑Rausch‑Verhältnis (dB)" - }, - { - "label": "Anschlüsse", - "description": "Anschlüsse" - }, - { - "label": "Ausgangsimpedanz (Ω)", - "description": "Ausgangsimpedanz (Ω)" - } - ] - }, - { - "label": "mechanical", - "description": "All mechanical properties", - "propertyTypes":[ - { - "label": "Abmessungen (mm)", - "description": "All mechanical properties" - }, - { - "label": "Gewicht (kg)", - "description": "All mechanical properties" - }, - { - "label": "Kapazität (kg)", - "description": "All mechanical properties" - }, - { - "label": "Programms/Features", - "description": "All mechanical properties" - }, - { - "label": "Wasserverbrauch pro Zyklus (L)", - "description": "All mechanical properties" - }, - { - "label": "Material Innenraum", - "description": "All mechanical properties" - } { - "label": "Kapazität/Volumen (L)", - "description": "All mechanical properties" - }, - { - "label": "Schleuderdrehzahl (U/min)", - "description": "All mechanical properties" - } - ] - }, - { - "label": "other", - "description": "All other properties", - "propertyTypes":[ - { - "label": "Preis (USD)", - "description": "All other properties" - }, - { - "label": "Zusatzfunktionen", - "description": "All other properties" - }, { - "label": "Bedienungsart", - "description": "All other properties" - }, { - "label": "Energieeffizienzklasse", - "description": "All other properties" - } - ] - } - ] -}] \ No newline at end of file +[ + { + "label": "X-CPQ", + "description": "Property Type Group for X-CPQ", + "propertyTypeGroups": [ + { + "label": "electrical", + "description": "All electrical property types", + "propertyTypes": [ + { + "label": "Spannungsversorgung (V)", + "description": "Spannungsversorgung (V)", + "values": [ + 220, + 230 + ] + }, + { + "label": "Leistung (W)", + "description": "Leistung", + "values": [ + 0, + 140, + 130, + 120, + 110, + 100, + 90, + 80, + 70, + 60, + 50, + 28, + 26, + 24, + 22, + 20 + ] + }, + { + "label": "Eingangsimpedanz (Ω)", + "description": "Wiederstand der Eingangsimpedanz", + "values": [ + 10 + ] + }, + { + "label": "Frequenzbereich (Hz‑kHz)", + "description": "Frequenzbereich (Hz‑kHz)", + "values": [ + "87‑108" + ] + }, + { + "label": "Signal‑Rausch‑Verhältnis (dB)", + "description": "Signal‑Rausch‑Verhältnis (dB)", + "values": [ + 48, + 46, + 47, + 45, + 49, + 44 + ] + }, + { + "label": "Anschlüsse", + "description": "Anschlüsse", + "values": [ + "UKW+Bluetooth+DL", + "UKW+Wi‑Fi+DL", + "UKW+DL+Bluetooth", + "UKW+Bluetooth+Wi‑Fi", + "UKW+Wi‑Fi+DL", + "UKW+Wi‑Fi", + "UKW+Bluetooth", + "UKW+DL", + "UKW" + ] + }, + { + "label": "Ausgangsimpedanz (Ω)", + "description": "Ausgangsimpedanz (Ω)", + "values": [ + 75 + ] + } + ] + }, + { + "label": "mechanical", + "description": "All mechanical properties", + "propertyTypes": [ + { + "label": "Abmessungen (mm)", + "description": "All mechanical properties", + "values": [ + "158x88x33", + "310x210x110", + "160x90x35", + "170x100x42", + "150x80x30", + "155x85x32", + "165x95x38", + "305x205x105", + "172x102x44", + "340x240x140", + "420x320x140", + "162x92x36", + "300x200x100", + "168x98x40", + "315x215x115", + "325x225x125", + "415x315x135", + "320x220x120", + "335x235x135", + "330x230x130", + "400x300x120", + "405x305x125", + "345x245x145", + "295x245x135", + "410x310x130", + "290x240x130", + "285x235x125", + "280x230x120", + "275x225x115", + "270x220x110", + "265x215x105", + "255x205x95", + "260x210x100", + "250x200x90", + "445x345x165", + "440x340x160", + "435x335x155", + "430x330x150", + "425x325x145" + ] + }, + { + "label": "Gewicht (kg)", + "description": "All mechanical properties", + "values": [ + 3, + 6, + 4, + 2 + ] + }, + { + "label": "Kapazität (kg)", + "description": "All mechanical properties", + "values": [ + 0 + ] + }, + { + "label": "Programms/Features", + "description": "All mechanical properties", + "values": [] + }, + { + "label": "Wasserverbrauch pro Zyklus (L)", + "description": "All mechanical properties", + "values": [] + }, + { + "label": "Material Innenraum", + "description": "All mechanical properties", + "values": [] + }, + { + "label": "Kapazität/Volumen (L)", + "description": "All mechanical properties", + "values": [] + }, + { + "label": "Schleuderdrehzahl (U/min)", + "description": "All mechanical properties", + "values": [] + } + ] + }, + { + "label": "other", + "description": "All other properties", + "propertyTypes": [ + { + "label": "Preis (USD)", + "description": "All other properties", + "values": [] + }, + { + "label": "Zusatzfunktionen", + "description": "All other properties", + "values": [] + }, + { + "label": "Bedienungsart", + "description": "All other properties", + "values": [] + }, + { + "label": "Energieeffizienzklasse", + "description": "All other properties", + "values": [] + } + ] + } + ] + } +] \ No newline at end of file diff --git a/xcpq/buildtime/xcpq_editor/cmd/config.toml b/xcpq/buildtime/xcpq_editor/cmd/config.toml index c547bb921..697182581 100644 --- a/xcpq/buildtime/xcpq_editor/cmd/config.toml +++ b/xcpq/buildtime/xcpq_editor/cmd/config.toml @@ -4,8 +4,8 @@ # password= dbname= [database] -connection_string = "host=192.168.178.50 port=5432 user=tsindt password=XD14ko8d dbname=xcpq sslmode=disable" -## connection_string = "host=localhost port=5432 user=tsindt password=XD14ko8d dbname=xcpq sslmode=disable" +##connection_string = "host=192.168.178.50 port=5432 user=tsindt password=XD14ko8d dbname=xcpq sslmode=disable" +connection_string = "host=localhost port=5432 user=tsindt password=XD14ko8d dbname=xcpq sslmode=disable" driver_name = "postgres" ################################################################ From 6ec1fb2816b127b3582f1847ddf6f4cf8df7c232 Mon Sep 17 00:00:00 2001 From: Thomas Sindt Date: Sun, 13 Sep 2026 09:41:34 +0200 Subject: [PATCH 2/3] start implementing dataimport --- xcpq/.ignore | 0 .../xcpq_editor/internal/config/.ignore | 0 .../xcpq_editor/internal/models/.ignore | 0 .../xcpq_editor/internal/repositories/.ignore | 0 .../repositories/import_repository.go | 52 +++ .../xcpq_editor/internal/services/.ignore | 0 .../internal/services/import_service.go | 20 ++ xcpq/database/dump-xcpq-202609130909.sql | Bin 0 -> 10644 bytes xcpq/database/dump-xcpq-202609130915.sql | 329 ++++++++++++++++++ 9 files changed, 401 insertions(+) delete mode 100644 xcpq/.ignore delete mode 100644 xcpq/buildtime/xcpq_editor/internal/config/.ignore delete mode 100644 xcpq/buildtime/xcpq_editor/internal/models/.ignore delete mode 100644 xcpq/buildtime/xcpq_editor/internal/repositories/.ignore create mode 100644 xcpq/buildtime/xcpq_editor/internal/repositories/import_repository.go delete mode 100644 xcpq/buildtime/xcpq_editor/internal/services/.ignore create mode 100644 xcpq/buildtime/xcpq_editor/internal/services/import_service.go create mode 100644 xcpq/database/dump-xcpq-202609130909.sql create mode 100644 xcpq/database/dump-xcpq-202609130915.sql diff --git a/xcpq/.ignore b/xcpq/.ignore deleted file mode 100644 index e69de29bb..000000000 diff --git a/xcpq/buildtime/xcpq_editor/internal/config/.ignore b/xcpq/buildtime/xcpq_editor/internal/config/.ignore deleted file mode 100644 index e69de29bb..000000000 diff --git a/xcpq/buildtime/xcpq_editor/internal/models/.ignore b/xcpq/buildtime/xcpq_editor/internal/models/.ignore deleted file mode 100644 index e69de29bb..000000000 diff --git a/xcpq/buildtime/xcpq_editor/internal/repositories/.ignore b/xcpq/buildtime/xcpq_editor/internal/repositories/.ignore deleted file mode 100644 index e69de29bb..000000000 diff --git a/xcpq/buildtime/xcpq_editor/internal/repositories/import_repository.go b/xcpq/buildtime/xcpq_editor/internal/repositories/import_repository.go new file mode 100644 index 000000000..3ff766f4f --- /dev/null +++ b/xcpq/buildtime/xcpq_editor/internal/repositories/import_repository.go @@ -0,0 +1,52 @@ +package repositories + +import ( + "database/sql" + "xcpq_editor/internal/models" +) + +type Import_Repository struct { + db *sql.DB + vr *Value_Repository + pt *Property_Type_Repository + ptg *Property_Types_Group_Repository + pr *Property_Repository +} + +func NewImport_Repository(db *sql.DB, vr *Value_Repository, pt *Property_Type_Repository, ptg *Property_Types_Group_Repository, pr *Property_Repository) *Import_Repository { + return &Import_Repository{ + db: db, + vr: vr, + pt: pt, + ptg: ptg, + pr: pr, + } +} + +func (r *Import_Repository) ImportPropertyTypesData(newGroup *models.Property_Types_Group, parentGroup *models.Property_Types_Group) error { + // Implement the import logic here + if newGroup.Id == 0 { + /** + * If the root ID is 0, it means the root property types group is not yet persisted. + * Implement the logic to handle this case, e.g., insert the root group into the database. + */ + group, err := r.ptg.CreatePropertyTypesGroup(newGroup, parentGroup) + if err != nil { + return err + } + newGroup.Id = group.Id + for _, childPropertyType := range newGroup.Property_Types { + _, err := r.pt.CreatePropertyType(&childPropertyType, newGroup, &childPropertyType.Property) + if err != nil { + return err + } + } + for _, childGroup := range newGroup.Property_Types_Groups { + err := r.ImportPropertyTypesData(&childGroup, newGroup) + if err != nil { + return err + } + } + } + return nil +} diff --git a/xcpq/buildtime/xcpq_editor/internal/services/.ignore b/xcpq/buildtime/xcpq_editor/internal/services/.ignore deleted file mode 100644 index e69de29bb..000000000 diff --git a/xcpq/buildtime/xcpq_editor/internal/services/import_service.go b/xcpq/buildtime/xcpq_editor/internal/services/import_service.go new file mode 100644 index 000000000..385044db5 --- /dev/null +++ b/xcpq/buildtime/xcpq_editor/internal/services/import_service.go @@ -0,0 +1,20 @@ +package services + +import ( + "xcpq_editor/internal/models" + "xcpq_editor/internal/repositories" +) + +type Import_Service struct { + importRepository *repositories.Import_Repository +} + +func NewImport_Service(importRepository *repositories.Import_Repository) *Import_Service { + return &Import_Service{ + importRepository: importRepository, + } +} + +func (s *Import_Service) ImportPropertyTypesData(newGroup *models.Property_Types_Group, parentGroup *models.Property_Types_Group) error { + return s.importRepository.ImportPropertyTypesData(newGroup, parentGroup) +} diff --git a/xcpq/database/dump-xcpq-202609130909.sql b/xcpq/database/dump-xcpq-202609130909.sql new file mode 100644 index 0000000000000000000000000000000000000000..e9e7801335559439268f5a1f8c11ce588b359ac6 GIT binary patch literal 10644 zcmc&)%Woq|8SjJzb|XLw;w2EM7y(JZas0?Q$)GuS>`r3FFKj2XvjVJ+U9nqZw>{nM z$z%^4xUPg)ka#Y;EbIkoFUw(1+#>z}?!2`82M8fxFMMBBm%F>V+IC*rmeTI-s;>I# z_x-*{eVzJ#u~J`pUVG-*r6p}ugX6jB>7#h{ES|oHrzJc+1Ak9Dfz9fIo{DP|r6C z2lagGfD7o~G68p(fMvbVBI91WW4Oj()JrZq#ZYHj_Y{4P=h?Nfe_| ztB0pl0{~s&_z?WLj%jt>SWaOVejoywT>ADDfnBDmu{|17+cl}fhHDlM^h%zi@Hu$H zLxDdgerJ&Pv(U`sRW!z0z#=mLVyd;EX?`50i_D~b7-g(gDtfiW9m0402c%XdkvB-G zNmlcN0VOTtn8L4>AYGG^q3M$P6bmx3y5z_hOsGR%nh{l5;Icxj-gbPBQmD zgQWc6-9_7o2ItlixC2~p@W>&A$Y$)qGY{f#39XNgYRnT#|G;~Dt7vPYt~z|K4pv8O_Ea0&qi zku|1hvrCT6o@u$HsPE+u%PnHjr!FjSZPjO6;585A)jM}=+UpDq$5|)UT8mT<%jEk{|e$QaPUn&s#)dcWvvK0Vn8Oi@MfdQ~)JXEXp+!0K&>4vyg-z)6r(2(j=e42X~W zO#o`i1ZY8w$qDiZxY3pzL3^}+ z{*Dd&d_aMMJUe-WjJFX?e*ofj^jSKE9#YTLHN_yAd#@{@#;uu>M8b_mF@F0p7=u5? zRL<@0XrF?XFqJ(L$c!#6%xG_bYb17|R)sQ5 zz63iYm8_WQS|hh@O$Gxg7rj)9%koy1mik#KPm$*tKrp9d31uAfHvslUnD1eEg9h-1 z(f~dW@~I3!kRxIT@4yR-+kv16n!`O~GK69o1c`|a(bpz5yJuLY!*WQLLe@o=$Xx9T zi@`OJ+d&or0GI_s!uuc%Q{Cq=W7>cfyR zNQrQ{7Kc_4nLr8Q1_0pEbos6T;D<^8W{1+*IJk3h5biP-4yi^H3Sc*Y33qqPFA7Y4 zti(j}b+bX>c~sbJgwYeWZswn+MgeBUEaKV;zr~DW`Bbd!H@G%-pl=Z0tJG!Uk3f%U zxf4DNG2ftllRZ^@gn<>!sof<+{a5u_=JG}@moWd0g0lm|RVJ6pc@^>PY*xb>uJ1a8 zQ$qa5kLVc_!q3lG4OGK2Zob@tZ!g?W)~e+gf5_^P`C^gyL&!6bdZSdyHy)Dv`a@&_ z*5M8oo`A4;5d8(OZEp>;i=kNL9m7S$X>0Xm-egN z7l+ITI;@k1zNa_vBWY6@Qy~5IEZ%eB&4opb=p|l0wVD=6cQNv1v)~v|N1064`<40r zTV* zsn8ATx^fkYBbkwrdoPypx3k)3VBMal@ZsT{i{tpq@XD+hILl+mb0~SuQ_MM}hE5)# z_ZO5WN@uPQJ{=g@6-X?&>ydfKBeCp!{u`@`^tSdjSciv?XR(5@p^%N~_Y4p8`#ETY zXHa^fm_6QXHzX3Oh24?2xAK(u!iB_+Q>6;1D`?fz=9Z_;bc}0yQ|X%UU%-N{X$Gpk zZ}Jup^-piG(Uksap@D(q!a)gg1wS2$Z*r24;>A1f8vCUG tGP$I&`Vd0=^wpRD^pAJnUDlTWsQnJ^v0%i?B5{qZWDwWL_Ri|Y{{zs{Fg^eP literal 0 HcmV?d00001 diff --git a/xcpq/database/dump-xcpq-202609130915.sql b/xcpq/database/dump-xcpq-202609130915.sql new file mode 100644 index 000000000..c63b16cc0 --- /dev/null +++ b/xcpq/database/dump-xcpq-202609130915.sql @@ -0,0 +1,329 @@ +-- +-- PostgreSQL database dump +-- + +\restrict GIC3drewyMgulrEtIK7aSkXSq2vxnkXYUQhmWYUZdn3fSeyrHHRbtaWNqN975Kg + +-- Dumped from database version 18.4 (Debian 18.4-1.pgdg13+1) +-- Dumped by pg_dump version 18.6 + +-- Started on 2026-09-13 09:15:21 CEST + +SET statement_timeout = 0; +SET lock_timeout = 0; +SET idle_in_transaction_session_timeout = 0; +SET transaction_timeout = 0; +SET client_encoding = 'UTF8'; +SET standard_conforming_strings = on; +SELECT pg_catalog.set_config('search_path', '', false); +SET check_function_bodies = false; +SET xmloption = content; +SET client_min_messages = warning; +SET row_security = off; + +-- +-- TOC entry 6 (class 2615 OID 20689) +-- Name: properties; Type: SCHEMA; Schema: -; Owner: tsindt +-- + +CREATE SCHEMA properties; + + +ALTER SCHEMA properties OWNER TO tsindt; + +-- +-- TOC entry 3481 (class 0 OID 0) +-- Dependencies: 6 +-- Name: SCHEMA properties; Type: COMMENT; Schema: -; Owner: tsindt +-- + +COMMENT ON SCHEMA properties IS 'Alle Tabellen, die mit Properties und Values zu tun haben.'; + + +-- +-- TOC entry 220 (class 1259 OID 20691) +-- Name: properties_id_seq; Type: SEQUENCE; Schema: properties; Owner: tsindt +-- + +CREATE SEQUENCE properties.properties_id_seq + START WITH 1000000 + INCREMENT BY 1 + MINVALUE 1000000 + MAXVALUE 4999999 + CACHE 1; + + +ALTER SEQUENCE properties.properties_id_seq OWNER TO tsindt; + +-- +-- TOC entry 3482 (class 0 OID 0) +-- Dependencies: 220 +-- Name: SEQUENCE properties_id_seq; Type: COMMENT; Schema: properties; Owner: tsindt +-- + +COMMENT ON SEQUENCE properties.properties_id_seq IS 'Zähler für property und value IDs '; + + +SET default_tablespace = ''; + +SET default_table_access_method = heap; + +-- +-- TOC entry 223 (class 1259 OID 20722) +-- Name: properties; Type: TABLE; Schema: properties; Owner: tsindt +-- + +CREATE TABLE properties.properties ( + id bigint DEFAULT nextval('properties.properties_id_seq'::regclass) NOT NULL, + name text, + description text, + parent_property_id bigint DEFAULT 0 NOT NULL, + property_type_id bigint NOT NULL, + products_groups_id bigint DEFAULT 0 NOT NULL, + products_id bigint DEFAULT 0 NOT NULL, + image_url text DEFAULT 'https://www.thomas-sindt.de/img/properties_group.svg'::text +); + + +ALTER TABLE properties.properties OWNER TO tsindt; + +-- +-- TOC entry 3483 (class 0 OID 0) +-- Dependencies: 223 +-- Name: TABLE properties; Type: COMMENT; Schema: properties; Owner: tsindt +-- + +COMMENT ON TABLE properties.properties IS 'Eigenschaften, die Listen von Werten enthalten und eine Information, von welchem property sich dieses Property ableitet. Ist parent_property_id = 0, dann ist dieses ein Root-Property zu dem referenzierten PropertyType.'; + + +-- +-- TOC entry 3484 (class 0 OID 0) +-- Dependencies: 223 +-- Name: COLUMN properties.name; Type: COMMENT; Schema: properties; Owner: tsindt +-- + +COMMENT ON COLUMN properties.properties.name IS 'Der Name sollte derselbe sein, wie der referenzierte Property Type.'; + + +-- +-- TOC entry 3485 (class 0 OID 0) +-- Dependencies: 223 +-- Name: COLUMN properties.products_groups_id; Type: COMMENT; Schema: properties; Owner: tsindt +-- + +COMMENT ON COLUMN properties.properties.products_groups_id IS 'Referenziert auf dieProduktgruppe, zu dem dieses Property gehört. Wenn es zu keiner Produktgruppe gehört ist diese referenz = 0'; + + +-- +-- TOC entry 3486 (class 0 OID 0) +-- Dependencies: 223 +-- Name: COLUMN properties.products_id; Type: COMMENT; Schema: properties; Owner: tsindt +-- + +COMMENT ON COLUMN properties.properties.products_id IS 'Referenziert auf das Produkt, zu dem dieses Property gehört. Wenn es zu keinem Produkt gehört ist diese referenz = 0'; + + +-- +-- TOC entry 222 (class 1259 OID 20707) +-- Name: property_types; Type: TABLE; Schema: properties; Owner: tsindt +-- + +CREATE TABLE properties.property_types ( + id bigint DEFAULT nextval('properties.properties_id_seq'::regclass) NOT NULL, + name text, + description text, + property_types_groups_id bigint NOT NULL, + image_url text DEFAULT 'https://www.thomas-sindt.de/img/category.svg'::text +); + + +ALTER TABLE properties.property_types OWNER TO tsindt; + +-- +-- TOC entry 3487 (class 0 OID 0) +-- Dependencies: 222 +-- Name: TABLE property_types; Type: COMMENT; Schema: properties; Owner: tsindt +-- + +COMMENT ON TABLE properties.property_types IS 'Definition von properties'; + + +-- +-- TOC entry 221 (class 1259 OID 20698) +-- Name: property_types_groups; Type: TABLE; Schema: properties; Owner: tsindt +-- + +CREATE TABLE properties.property_types_groups ( + id bigint DEFAULT nextval('properties.properties_id_seq'::regclass) CONSTRAINT property_types_group_id_not_null NOT NULL, + name text, + description text, + parent_property_type_group_id bigint, + image_url text DEFAULT 'https://thomas-sindt/img/category.svg'::text +); + + +ALTER TABLE properties.property_types_groups OWNER TO tsindt; + +-- +-- TOC entry 3488 (class 0 OID 0) +-- Dependencies: 221 +-- Name: TABLE property_types_groups; Type: COMMENT; Schema: properties; Owner: tsindt +-- + +COMMENT ON TABLE properties.property_types_groups IS 'Baumstruktur zur Organisation von Property types +Wenn parent_property_types_group = 0, dann ist diese Gruppe eine Rootgruppe.'; + + +-- +-- TOC entry 224 (class 1259 OID 20743) +-- Name: values; Type: TABLE; Schema: properties; Owner: tsindt +-- + +CREATE TABLE properties."values" ( + id bigint DEFAULT nextval('properties.properties_id_seq'::regclass) NOT NULL, + value text, + properties_id bigint NOT NULL, + image_url text DEFAULT 'https://www.thomas-sindt.de/img/property.svg'::text +); + + +ALTER TABLE properties."values" OWNER TO tsindt; + +-- +-- TOC entry 3474 (class 0 OID 20722) +-- Dependencies: 223 +-- Data for Name: properties; Type: TABLE DATA; Schema: properties; Owner: tsindt +-- + +COPY properties.properties (id, name, description, parent_property_id, property_type_id, products_groups_id, products_id, image_url) FROM stdin; +\. + + +-- +-- TOC entry 3473 (class 0 OID 20707) +-- Dependencies: 222 +-- Data for Name: property_types; Type: TABLE DATA; Schema: properties; Owner: tsindt +-- + +COPY properties.property_types (id, name, description, property_types_groups_id, image_url) FROM stdin; +\. + + +-- +-- TOC entry 3472 (class 0 OID 20698) +-- Dependencies: 221 +-- Data for Name: property_types_groups; Type: TABLE DATA; Schema: properties; Owner: tsindt +-- + +COPY properties.property_types_groups (id, name, description, parent_property_type_group_id, image_url) FROM stdin; +\. + + +-- +-- TOC entry 3475 (class 0 OID 20743) +-- Dependencies: 224 +-- Data for Name: values; Type: TABLE DATA; Schema: properties; Owner: tsindt +-- + +COPY properties."values" (id, value, properties_id, image_url) FROM stdin; +\. + + +-- +-- TOC entry 3489 (class 0 OID 0) +-- Dependencies: 220 +-- Name: properties_id_seq; Type: SEQUENCE SET; Schema: properties; Owner: tsindt +-- + +SELECT pg_catalog.setval('properties.properties_id_seq', 1000000, false); + + +-- +-- TOC entry 3318 (class 2606 OID 20733) +-- Name: properties properties_pkey; Type: CONSTRAINT; Schema: properties; Owner: tsindt +-- + +ALTER TABLE ONLY properties.properties + ADD CONSTRAINT properties_pkey PRIMARY KEY (id); + + +-- +-- TOC entry 3314 (class 2606 OID 20706) +-- Name: property_types_groups property_types_group_pkey; Type: CONSTRAINT; Schema: properties; Owner: tsindt +-- + +ALTER TABLE ONLY properties.property_types_groups + ADD CONSTRAINT property_types_group_pkey PRIMARY KEY (id); + + +-- +-- TOC entry 3316 (class 2606 OID 20716) +-- Name: property_types property_types_pkey; Type: CONSTRAINT; Schema: properties; Owner: tsindt +-- + +ALTER TABLE ONLY properties.property_types + ADD CONSTRAINT property_types_pkey PRIMARY KEY (id); + + +-- +-- TOC entry 3320 (class 2606 OID 20752) +-- Name: values values_pkey; Type: CONSTRAINT; Schema: properties; Owner: tsindt +-- + +ALTER TABLE ONLY properties."values" + ADD CONSTRAINT values_pkey PRIMARY KEY (id); + + +-- +-- TOC entry 3322 (class 2606 OID 20734) +-- Name: properties parent_property_type_id_fk; Type: FK CONSTRAINT; Schema: properties; Owner: tsindt +-- + +ALTER TABLE ONLY properties.properties + ADD CONSTRAINT parent_property_type_id_fk FOREIGN KEY (property_type_id) REFERENCES properties.property_types(id); + + +-- +-- TOC entry 3490 (class 0 OID 0) +-- Dependencies: 3322 +-- Name: CONSTRAINT parent_property_type_id_fk ON properties; Type: COMMENT; Schema: properties; Owner: tsindt +-- + +COMMENT ON CONSTRAINT parent_property_type_id_fk ON properties.properties IS 'Verweißt auf den Property Type dieses Properties'; + + +-- +-- TOC entry 3323 (class 2606 OID 20753) +-- Name: values properties_id_fk; Type: FK CONSTRAINT; Schema: properties; Owner: tsindt +-- + +ALTER TABLE ONLY properties."values" + ADD CONSTRAINT properties_id_fk FOREIGN KEY (properties_id) REFERENCES properties.properties(id); + + +-- +-- TOC entry 3321 (class 2606 OID 20717) +-- Name: property_types property_types_groups_id_fk; Type: FK CONSTRAINT; Schema: properties; Owner: tsindt +-- + +ALTER TABLE ONLY properties.property_types + ADD CONSTRAINT property_types_groups_id_fk FOREIGN KEY (property_types_groups_id) REFERENCES properties.property_types_groups(id); + + +-- +-- TOC entry 3491 (class 0 OID 0) +-- Dependencies: 3321 +-- Name: CONSTRAINT property_types_groups_id_fk ON property_types; Type: COMMENT; Schema: properties; Owner: tsindt +-- + +COMMENT ON CONSTRAINT property_types_groups_id_fk ON properties.property_types IS 'Referenz auf die Property Type Gruppe, zu der dieser Property Type gehört.'; + + +-- Completed on 2026-09-13 09:15:22 CEST + +-- +-- PostgreSQL database dump complete +-- + +\unrestrict GIC3drewyMgulrEtIK7aSkXSq2vxnkXYUQhmWYUZdn3fSeyrHHRbtaWNqN975Kg + From 4960f8c5fd0a26f53b89e40f1aa11530d8cc49e3 Mon Sep 17 00:00:00 2001 From: Thomas Sindt Date: Mon, 14 Sep 2026 08:47:08 +0200 Subject: [PATCH 3/3] data --- .../propertyTypeGroups copy.json | 211 ++++++++++++++++++ 1 file changed, 211 insertions(+) create mode 100644 buildtime/server/examples/household_example/propertyTypeGroups copy.json diff --git a/buildtime/server/examples/household_example/propertyTypeGroups copy.json b/buildtime/server/examples/household_example/propertyTypeGroups copy.json new file mode 100644 index 000000000..018952f79 --- /dev/null +++ b/buildtime/server/examples/household_example/propertyTypeGroups copy.json @@ -0,0 +1,211 @@ +[ + { + "label": "X-CPQ", + "description": "Property Type Group for X-CPQ", + "propertyTypeGroups": [ + { + "label": "electrical", + "description": "All electrical property types", + "propertyTypes": [ + { + "label": "Spannungsversorgung (V)", + "description": "Spannungsversorgung (V)", + "values": [ + 220, + 230 + ] + }, + { + "label": "Leistung (W)", + "description": "Leistung", + "values": [ + 0, + 140, + 130, + 120, + 110, + 100, + 90, + 80, + 70, + 60, + 50, + 28, + 26, + 24, + 22, + 20 + ] + }, + { + "label": "Eingangsimpedanz (Ω)", + "description": "Wiederstand der Eingangsimpedanz", + "values": [ + 10 + ] + }, + { + "label": "Frequenzbereich (Hz‑kHz)", + "description": "Frequenzbereich (Hz‑kHz)", + "values": [ + "87‑108" + ] + }, + { + "label": "Signal‑Rausch‑Verhältnis (dB)", + "description": "Signal‑Rausch‑Verhältnis (dB)", + "values": [ + 48, + 46, + 47, + 45, + 49, + 44 + ] + }, + { + "label": "Anschlüsse", + "description": "Anschlüsse", + "values": [ + "UKW+Bluetooth+DL", + "UKW+Wi‑Fi+DL", + "UKW+DL+Bluetooth", + "UKW+Bluetooth+Wi‑Fi", + "UKW+Wi‑Fi+DL", + "UKW+Wi‑Fi", + "UKW+Bluetooth", + "UKW+DL", + "UKW" + ] + }, + { + "label": "Ausgangsimpedanz (Ω)", + "description": "Ausgangsimpedanz (Ω)", + "values": [ + 75 + ] + } + ] + }, + { + "label": "mechanical", + "description": "All mechanical properties", + "propertyTypes": [ + { + "label": "Abmessungen (mm)", + "description": "All mechanical properties", + "values": [ + "158x88x33", + "310x210x110", + "160x90x35", + "170x100x42", + "150x80x30", + "155x85x32", + "165x95x38", + "305x205x105", + "172x102x44", + "340x240x140", + "420x320x140", + "162x92x36", + "300x200x100", + "168x98x40", + "315x215x115", + "325x225x125", + "415x315x135", + "320x220x120", + "335x235x135", + "330x230x130", + "400x300x120", + "405x305x125", + "345x245x145", + "295x245x135", + "410x310x130", + "290x240x130", + "285x235x125", + "280x230x120", + "275x225x115", + "270x220x110", + "265x215x105", + "255x205x95", + "260x210x100", + "250x200x90", + "445x345x165", + "440x340x160", + "435x335x155", + "430x330x150", + "425x325x145" + ] + }, + { + "label": "Gewicht (kg)", + "description": "All mechanical properties", + "values": [ + 3, + 6, + 4, + 2 + ] + }, + { + "label": "Kapazität (kg)", + "description": "All mechanical properties", + "values": [ + 0 + ] + }, + { + "label": "Programms/Features", + "description": "All mechanical properties", + "values": [] + }, + { + "label": "Wasserverbrauch pro Zyklus (L)", + "description": "All mechanical properties", + "values": [] + }, + { + "label": "Material Innenraum", + "description": "All mechanical properties", + "values": [] + }, + { + "label": "Kapazität/Volumen (L)", + "description": "All mechanical properties", + "values": [] + }, + { + "label": "Schleuderdrehzahl (U/min)", + "description": "All mechanical properties", + "values": [] + } + ] + }, + { + "label": "other", + "description": "All other properties", + "propertyTypes": [ + { + "label": "Preis (USD)", + "description": "All other properties", + "values": [] + }, + { + "label": "Zusatzfunktionen", + "description": "All other properties", + "values": [] + }, + { + "label": "Bedienungsart", + "description": "All other properties", + "values": [] + }, + { + "label": "Energieeffizienzklasse", + "description": "All other properties", + "values": [] + } + ] + } + ] + } +] \ No newline at end of file