dokumentation

This commit is contained in:
2026-07-23 10:51:40 +02:00
parent 9068a6567b
commit f4c078f776
11 changed files with 1935 additions and 2 deletions
+17 -2
View File
@@ -1,7 +1,8 @@
# Simple CPQ
Simply CPQ soll eine kleine, einfache CPQ Lösung für Klein- und Mittständische Unternehmen sein, die schnell aufgesetzt ist und leicht zu pflegen und warten.
Folgende Eigenschaften soll sie besitzen:
## Folgende Eigenschaften soll sie besitzen:
- Open Source Lösung
- Source Code überprüfbar und auf Wunsch erweiterbar (GPL 3)
- Ohne Vendor-Login
@@ -33,7 +34,21 @@ Folgende Eigenschaften soll sie besitzen:
- Implementiert auf Basis von GO (Server lassen sich sehr einfach mit GO bauen)
- Mehrsprachig
- Produktdaten
- Pflege der Logik in Excel
- Pflege der Logik in Excel (bin ich mir noch nicht sicher)
- Produktdatenimport, Preis- und Kostenlisten sowie Logik als CSV
- K-Modell von Axel Brinkop
- Globaler Merkmalspool für eindeutige Merkmale und deren Wertemengen
## Installation
## Erste Schritte
## Entwicklungstools:
### Go
Die Software ist hauptsächlich in GO geschrieben ab der Version 1.22.
### VSCode
Als Quelltext-Editor / IDE kommt VSCode zum Einsatz.
### DBeaver
Ist der Datenbank-Editor
+2
View File
@@ -0,0 +1,2 @@
# Simply CPQ Buildtime Client
Dieser Ordner enthält alle relevanten Dateien und Informationen zum Simply CPQ Buildtime Client. Dieser dient der Pflege von Produktdaten, Regeln, Konditionen und Administration der Simply CPQ Anwendung.
+2
View File
@@ -0,0 +1,2 @@
# Simply CPQ Buildtime Server
Dieser Ordner enthält alle relevanten Dateien und Informationen zum Simply CPQ Buildtime Server. Dieser dient der Pflege von Produktdaten, Regeln, Konditionen und Administration der Simply CPQ Anwendung durch die Bereitstellung des Pflege-Servers.
@@ -0,0 +1,747 @@
-- DROP SCHEMA public;
CREATE SCHEMA public AUTHORIZATION pg_database_owner;
COMMENT ON SCHEMA public IS 'standard public schema';
-- DROP SEQUENCE public.calculations_id_seq;
CREATE SEQUENCE public.calculations_id_seq
INCREMENT BY 1
MINVALUE 1
MAXVALUE 2147483647
START 1
CACHE 1
NO CYCLE;
-- DROP SEQUENCE public.condition_application_id_seq;
CREATE SEQUENCE public.condition_application_id_seq
INCREMENT BY 1
MINVALUE 1
MAXVALUE 2147483647
START 1
CACHE 1
NO CYCLE;
-- DROP SEQUENCE public.conditions_id_seq;
CREATE SEQUENCE public.conditions_id_seq
INCREMENT BY 1
MINVALUE 1
MAXVALUE 2147483647
START 1
CACHE 1
NO CYCLE;
-- DROP SEQUENCE public.languages_id_seq;
CREATE SEQUENCE public.languages_id_seq
INCREMENT BY 1
MINVALUE 1
MAXVALUE 2147483647
START 1
CACHE 1
NO CYCLE;
-- DROP SEQUENCE public.meta_fieldcatalog_id_seq;
CREATE SEQUENCE public.meta_fieldcatalog_id_seq
INCREMENT BY 1
MINVALUE 1
MAXVALUE 2147483647
START 1
CACHE 1
NO CYCLE;
-- DROP SEQUENCE public.product_type_groups_id_seq;
CREATE SEQUENCE public.product_type_groups_id_seq
INCREMENT BY 1
MINVALUE 1
MAXVALUE 2147483647
START 1
CACHE 1
NO CYCLE;
-- DROP SEQUENCE public.product_type_id_seq;
CREATE SEQUENCE public.product_type_id_seq
INCREMENT BY 1
MINVALUE 1
MAXVALUE 2147483647
START 1
CACHE 1
NO CYCLE;
-- DROP SEQUENCE public.product_type_structure_nodes_id_seq;
CREATE SEQUENCE public.product_type_structure_nodes_id_seq
INCREMENT BY 1
MINVALUE 1
MAXVALUE 2147483647
START 1
CACHE 1
NO CYCLE;
-- DROP SEQUENCE public.property_type_group_id_seq;
CREATE SEQUENCE public.property_type_group_id_seq
INCREMENT BY 1
MINVALUE 1
MAXVALUE 2147483647
START 1
CACHE 1
NO CYCLE;
-- DROP SEQUENCE public.property_types_id_seq;
CREATE SEQUENCE public.property_types_id_seq
INCREMENT BY 1
MINVALUE 1
MAXVALUE 2147483647
START 1
CACHE 1
NO CYCLE;
-- DROP SEQUENCE public.row_descriptions_id_seq;
CREATE SEQUENCE public.row_descriptions_id_seq
INCREMENT BY 1
MINVALUE 1
MAXVALUE 2147483647
START 1
CACHE 1
NO CYCLE;
-- DROP SEQUENCE public.rules_list_product_type_set_amount_of_id_seq;
CREATE SEQUENCE public.rules_list_product_type_set_amount_of_id_seq
INCREMENT BY 1
MINVALUE 1
MAXVALUE 2147483647
START 1
CACHE 1
NO CYCLE;
-- DROP SEQUENCE public.units_id_seq;
CREATE SEQUENCE public.units_id_seq
INCREMENT BY 1
MINVALUE 1
MAXVALUE 2147483647
START 1
CACHE 1
NO CYCLE;
-- DROP SEQUENCE public.values_id_seq;
CREATE SEQUENCE public.values_id_seq
INCREMENT BY 1
MINVALUE 1
MAXVALUE 2147483647
START 1
CACHE 1
NO CYCLE;
-- DROP SEQUENCE public.values_type_id_seq;
CREATE SEQUENCE public.values_type_id_seq
INCREMENT BY 1
MINVALUE 1
MAXVALUE 2147483647
START 1
CACHE 1
NO CYCLE;-- public.calculations definition
-- Drop table
-- DROP TABLE public.calculations;
CREATE TABLE public.calculations (
id serial4 NOT NULL,
"label" varchar NULL, -- Bezeichner der Kalkulationsdefinition
description varchar NULL, -- Beschreibung der Kalkulationsvorschrift
formula varchar NOT NULL, -- Formel der kalkulation:¶{field_id}+-*/[row_id]¶Die Werte aus der jeweiligen Spalte werden genommen.
CONSTRAINT calculations_formula_not_null NOT NULL formula,
CONSTRAINT calculations_id_not_null NOT NULL id,
CONSTRAINT calculations_pk PRIMARY KEY (id)
);
COMMENT ON TABLE public.calculations IS 'Kalkulationsdefinitionen für Kalkulationsspalten';
-- Column comments
COMMENT ON COLUMN public.calculations."label" IS 'Bezeichner der Kalkulationsdefinition';
COMMENT ON COLUMN public.calculations.description IS 'Beschreibung der Kalkulationsvorschrift';
COMMENT ON COLUMN public.calculations.formula IS 'Formel der kalkulation:
{field_id}+-*/[row_id]
Die Werte aus der jeweiligen Spalte werden genommen.';
-- public.condition_applications definition
-- Drop table
-- DROP TABLE public.condition_applications;
CREATE TABLE public.condition_applications (
id int4 DEFAULT nextval('condition_application_id_seq'::regclass) NOT NULL,
"label" varchar NULL,
description varchar NULL,
CONSTRAINT condition_application_id_not_null NOT NULL id,
CONSTRAINT condition_application_pk PRIMARY KEY (id)
);
COMMENT ON TABLE public.condition_applications IS 'Z.B. Preisliste Deutschland';
-- public.languages definition
-- Drop table
-- DROP TABLE public.languages;
CREATE TABLE public.languages (
id serial4 NOT NULL,
locale varchar NULL, -- Sprachlokalisierung der ausgewählten Sprache, z.B. "de-DE" für Deutsch
"language" varchar NULL, -- Name/Bezeichnung der Sprache
CONSTRAINT languages_id_not_null NOT NULL id,
CONSTRAINT languages_pk PRIMARY KEY (id)
);
COMMENT ON TABLE public.languages IS 'Sprachtabelle
Liste der zur Verfügung gestellten Sprachen.';
-- Column comments
COMMENT ON COLUMN public.languages.locale IS 'Sprachlokalisierung der ausgewählten Sprache, z.B. "de-DE" für Deutsch';
COMMENT ON COLUMN public.languages."language" IS 'Name/Bezeichnung der Sprache';
-- public.meta_condition_fields definition
-- Drop table
-- DROP TABLE public.meta_condition_fields;
CREATE TABLE public.meta_condition_fields (
id int4 DEFAULT nextval('meta_fieldcatalog_id_seq'::regclass) NOT NULL,
table_name varchar NOT NULL,
table_field varchar NOT NULL,
"label" varchar NULL,
description varchar NULL,
CONSTRAINT meta_fieldcatalog_id_not_null NOT NULL id,
CONSTRAINT meta_fieldcatalog_pk PRIMARY KEY (id),
CONSTRAINT meta_fieldcatalog_table_field_not_null NOT NULL table_field,
CONSTRAINT meta_fieldcatalog_table_name_not_null NOT NULL table_name
);
COMMENT ON TABLE public.meta_condition_fields IS 'Felder für die Konditionsbeschreibung';
-- public.product_types definition
-- Drop table
-- DROP TABLE public.product_types;
CREATE TABLE public.product_types (
id int4 DEFAULT nextval('product_type_id_seq'::regclass) NOT NULL,
product_identifierer varchar NOT NULL,
"label" varchar NULL,
CONSTRAINT product_type_id_not_null NOT NULL id,
CONSTRAINT product_type_pk PRIMARY KEY (id),
CONSTRAINT product_type_product_identifierer_not_null NOT NULL product_identifierer,
CONSTRAINT product_type_unique UNIQUE (product_identifierer)
);
COMMENT ON TABLE public.product_types IS 'Ein Produkttyp besteht aus Propertytypen, ggf. Strukturknoten, die Unterprodukttypen enthalten können und/oder Auswahlknoten, die ebenfalls Unterprodukttypen enthalten können';
-- public.value_types definition
-- Drop table
-- DROP TABLE public.value_types;
CREATE TABLE public.value_types (
"label" varchar NULL,
id int4 DEFAULT nextval('values_type_id_seq'::regclass) NOT NULL,
CONSTRAINT values_type_id_not_null NOT NULL id,
CONSTRAINT values_types_pk PRIMARY KEY (id)
);
-- public.conditions definition
-- Drop table
-- DROP TABLE public.conditions;
CREATE TABLE public.conditions (
id serial4 NOT NULL,
"label" varchar NULL,
description varchar NULL,
application_id int4 NULL,
key_value varchar NOT NULL, -- String als semikolon separierte Liste von Schlüssel-ids, definiert über die Tabele condition_keys mit der entsprechenden condition_id
value float4 NOT NULL, -- Wert der Kondition
CONSTRAINT condition_pk PRIMARY KEY (id),
CONSTRAINT conditions_id_not_null NOT NULL id,
CONSTRAINT conditions_key_value_not_null NOT NULL key_value,
CONSTRAINT conditions_value_not_null NOT NULL value,
CONSTRAINT conditions_condition_application_fk FOREIGN KEY (application_id) REFERENCES public.condition_applications(id)
);
-- Column comments
COMMENT ON COLUMN public.conditions.key_value IS 'String als semikolon separierte Liste von Schlüssel-ids, definiert über die Tabele condition_keys mit der entsprechenden condition_id';
COMMENT ON COLUMN public.conditions.value IS 'Wert der Kondition';
-- public.meta_condition_keys definition
-- Drop table
-- DROP TABLE public.meta_condition_keys;
CREATE TABLE public.meta_condition_keys (
field_id int4 NOT NULL,
condition_position int4 NULL,
"label" varchar NULL,
description varchar NULL,
condition_key_id int4 NOT NULL,
CONSTRAINT meta_condition_keys_condition_key_id_not_null NOT NULL condition_key_id,
CONSTRAINT meta_condition_keys_field_id_not_null NOT NULL field_id,
CONSTRAINT meta_condition_keys_meta_condition_fields_fk FOREIGN KEY (field_id) REFERENCES public.meta_condition_fields(id)
);
COMMENT ON TABLE public.meta_condition_keys IS 'Keydefinition für Konditionen';
-- public.product_type_groups definition
-- Drop table
-- DROP TABLE public.product_type_groups;
CREATE TABLE public.product_type_groups (
id serial4 NOT NULL,
"label" varchar NULL,
parent_group_id int4 NULL,
is_visible bool DEFAULT true NOT NULL,
CONSTRAINT product_type_groups_id_not_null NOT NULL id,
CONSTRAINT product_type_groups_is_visible_not_null NOT NULL is_visible,
CONSTRAINT product_type_groups_pk PRIMARY KEY (id),
CONSTRAINT product_type_groups_product_type_groups_fk FOREIGN KEY (parent_group_id) REFERENCES public.product_type_groups(id)
);
COMMENT ON TABLE public.product_type_groups IS 'Produktgruppe. Sie enthält die Property_types für die jeweiligen Produkte als Kopiervorlage';
-- public.product_type_is_part_of definition
-- Drop table
-- DROP TABLE public.product_type_is_part_of;
CREATE TABLE public.product_type_is_part_of (
product_type_id int4 NOT NULL, -- Komponenten-ID
is_part_of_product_tyoe_id int4 NOT NULL,
"number" int4 DEFAULT 1 NOT NULL,
min_number int4 DEFAULT 0 NOT NULL,
max_number int4 DEFAULT 1 NOT NULL,
CONSTRAINT product_type_is_part_of_is_part_of_product_tyoe_id_not_null NOT NULL is_part_of_product_tyoe_id,
CONSTRAINT product_type_is_part_of_max_number_not_null NOT NULL max_number,
CONSTRAINT product_type_is_part_of_min_number_not_null NOT NULL min_number,
CONSTRAINT product_type_is_part_of_number_not_null NOT NULL number,
CONSTRAINT product_type_is_part_of_product_type_id_not_null NOT NULL product_type_id,
CONSTRAINT product_type_is_part_of_unique UNIQUE (product_type_id, is_part_of_product_tyoe_id),
CONSTRAINT product_type_is_part_of_product_types_fk FOREIGN KEY (product_type_id) REFERENCES public.product_types(id),
CONSTRAINT product_type_is_part_of_product_types_fk_1 FOREIGN KEY (is_part_of_product_tyoe_id) REFERENCES public.product_types(id)
);
COMMENT ON TABLE public.product_type_is_part_of IS 'Hat Teile Beziehung';
-- Column comments
COMMENT ON COLUMN public.product_type_is_part_of.product_type_id IS 'Komponenten-ID';
-- public.product_type_structure_nodes definition
-- Drop table
-- DROP TABLE public.product_type_structure_nodes;
CREATE TABLE public.product_type_structure_nodes (
id serial4 NOT NULL,
"label" varchar NULL,
is_one_off_structure bool DEFAULT false NOT NULL,
product_type_id int4 NOT NULL, -- Zu welchem Produkt gehört diese Struktur
CONSTRAINT product_type_structure_nodes_id_not_null NOT NULL id,
CONSTRAINT product_type_structure_nodes_is_one_off_structure_not_null NOT NULL is_one_off_structure,
CONSTRAINT product_type_structure_nodes_pk PRIMARY KEY (id),
CONSTRAINT product_type_structure_nodes_product_type_id_not_null NOT NULL product_type_id,
CONSTRAINT product_type_structure_nodes_product_types_fk FOREIGN KEY (product_type_id) REFERENCES public.product_types(id)
);
COMMENT ON TABLE public.product_type_structure_nodes IS 'Strukturknoten für unterprodukte';
-- Column comments
COMMENT ON COLUMN public.product_type_structure_nodes.product_type_id IS 'Zu welchem Produkt gehört diese Struktur';
-- public.product_type_translations definition
-- Drop table
-- DROP TABLE public.product_type_translations;
CREATE TABLE public.product_type_translations (
product_type_id int4 NOT NULL,
language_id int4 NOT NULL,
"translation" varchar NULL,
CONSTRAINT product_type_translations_language_id_not_null NOT NULL language_id,
CONSTRAINT product_type_translations_property_type_id_not_null NOT NULL product_type_id,
CONSTRAINT product_type_translations_languages_fk FOREIGN KEY (language_id) REFERENCES public.languages(id),
CONSTRAINT product_type_translations_product_type_fk FOREIGN KEY (product_type_id) REFERENCES public.product_types(id)
);
-- public.product_types_group_translations definition
-- Drop table
-- DROP TABLE public.product_types_group_translations;
CREATE TABLE public.product_types_group_translations (
product_types_group_id int4 NOT NULL,
language_id int4 NOT NULL,
"translation" varchar NULL,
CONSTRAINT product_types_group_translation_product_types_group_id_not_null NOT NULL product_types_group_id,
CONSTRAINT product_types_group_translations_language_id_not_null NOT NULL language_id,
CONSTRAINT product_types_group_translations_unique UNIQUE (product_types_group_id, language_id),
CONSTRAINT product_types_group_translations_languages_fk FOREIGN KEY (language_id) REFERENCES public.languages(id),
CONSTRAINT product_types_group_translations_product_type_groups_fk FOREIGN KEY (product_types_group_id) REFERENCES public.product_type_groups(id)
);
-- public.property_type_groups definition
-- Drop table
-- DROP TABLE public.property_type_groups;
CREATE TABLE public.property_type_groups (
id int4 DEFAULT nextval('property_type_group_id_seq'::regclass) NOT NULL,
"label" varchar NULL,
description varchar NULL,
parent_proper_type_group_id int4 NULL,
CONSTRAINT property_type_group_id_not_null NOT NULL id,
CONSTRAINT property_type_group_pk PRIMARY KEY (id),
CONSTRAINT property_type_group_property_type_group_fk FOREIGN KEY (parent_proper_type_group_id) REFERENCES public.property_type_groups(id)
);
-- public.property_types definition
-- Drop table
-- DROP TABLE public.property_types;
CREATE TABLE public.property_types (
id serial4 NOT NULL,
"label" varchar NULL,
value_type_id int4 NULL,
CONSTRAINT property_types_id_not_null NOT NULL id,
CONSTRAINT property_types_pk PRIMARY KEY (id),
CONSTRAINT property_types_value_types_fk FOREIGN KEY (value_type_id) REFERENCES public.value_types(id)
);
COMMENT ON TABLE public.property_types IS 'Vorlage für Merkmale eines Produktes';
-- public.row_descriptions definition
-- Drop table
-- DROP TABLE public.row_descriptions;
CREATE TABLE public.row_descriptions (
id serial4 NOT NULL,
"label" varchar NULL,
description varchar NULL,
"position" int4 NOT NULL,
is_visible bool DEFAULT true NOT NULL,
field_id int4 NULL,
calculation_id int4 NULL,
is_editable bool DEFAULT false NOT NULL,
condition_id int4 NULL,
row_type int4 NULL, -- 1: field¶2: calculation¶3: condition
CONSTRAINT row_descriptions_id_not_null NOT NULL id,
CONSTRAINT row_descriptions_is_editable_not_null NOT NULL is_editable,
CONSTRAINT row_descriptions_is_visible_not_null NOT NULL is_visible,
CONSTRAINT row_descriptions_pk PRIMARY KEY (id),
CONSTRAINT row_descriptions_position_not_null NOT NULL "position",
CONSTRAINT row_descriptions_calculations_fk FOREIGN KEY (calculation_id) REFERENCES public.calculations(id),
CONSTRAINT row_descriptions_conditions_fk FOREIGN KEY (condition_id) REFERENCES public.conditions(id),
CONSTRAINT row_descriptions_meta_condition_fields_fk FOREIGN KEY (field_id) REFERENCES public.meta_condition_fields(id)
);
-- Column comments
COMMENT ON COLUMN public.row_descriptions.row_type IS '1: field
2: calculation
3: condition';
-- public.row_translations definition
-- Drop table
-- DROP TABLE public.row_translations;
CREATE TABLE public.row_translations (
row_id int4 NOT NULL,
language_id int4 NOT NULL,
"translation" varchar NULL,
CONSTRAINT row_translations_language_id_not_null NOT NULL language_id,
CONSTRAINT row_translations_row_id_not_null NOT NULL row_id,
CONSTRAINT row_translations_unique UNIQUE (row_id, language_id),
CONSTRAINT row_translations_languages_fk FOREIGN KEY (language_id) REFERENCES public.languages(id),
CONSTRAINT row_translations_row_descriptions_fk FOREIGN KEY (row_id) REFERENCES public.row_descriptions(id)
);
-- public.rules_list_product_type_set_amount_of definition
-- Drop table
-- DROP TABLE public.rules_list_product_type_set_amount_of;
CREATE TABLE public.rules_list_product_type_set_amount_of (
id serial4 NOT NULL,
product_type_id int4 NOT NULL, -- Produkt für das die Regel gelten soll
component_x_product_type_id int4 NOT NULL,
component_y_product_type_id int4 NOT NULL,
component_x_amount int4 DEFAULT 1 NOT NULL,
factor int4 DEFAULT 1 NOT NULL,
description varchar NULL,
CONSTRAINT rules_list_product_type_pk PRIMARY KEY (id),
CONSTRAINT rules_list_product_type_set_amount__component_x_amount_not_null NOT NULL component_x_amount,
CONSTRAINT rules_list_product_type_set_amount_of_factor_not_null NOT NULL factor,
CONSTRAINT rules_list_product_type_set_amount_of_id_not_null NOT NULL id,
CONSTRAINT rules_list_product_type_set_amount_of_product_type_id_not_null NOT NULL product_type_id,
CONSTRAINT rules_list_product_type_set_component_x_product_type_i_not_null NOT NULL component_x_product_type_id,
CONSTRAINT rules_list_product_type_set_component_y_product_type_i_not_null NOT NULL component_y_product_type_id,
CONSTRAINT rules_list_product_type_set_amount_of_product_types_fk FOREIGN KEY (product_type_id) REFERENCES public.product_types(id),
CONSTRAINT rules_list_product_type_set_amount_of_product_types_fk_1 FOREIGN KEY (component_x_product_type_id) REFERENCES public.product_types(id),
CONSTRAINT rules_list_product_type_set_amount_of_product_types_fk_2 FOREIGN KEY (component_y_product_type_id) REFERENCES public.product_types(id)
);
COMMENT ON TABLE public.rules_list_product_type_set_amount_of IS 'In Solution product_type:
Ist die Komponente x mehr als a * vertreten (in dr Regel 1)
dann setzte amount of Komponente y auf a * factor (in der Regel auch 1)';
-- Column comments
COMMENT ON COLUMN public.rules_list_product_type_set_amount_of.product_type_id IS 'Produkt für das die Regel gelten soll';
-- public.structure_node_product_types_list definition
-- Drop table
-- DROP TABLE public.structure_node_product_types_list;
CREATE TABLE public.structure_node_product_types_list (
structure_node_id int4 NOT NULL,
product_type_id int4 NOT NULL, -- Produkte in der Struktur
CONSTRAINT structure_node_product_types_list_product_type_id_not_null NOT NULL product_type_id,
CONSTRAINT structure_node_product_types_list_structure_node_id_not_null NOT NULL structure_node_id,
CONSTRAINT structure_node_product_types_list_product_type_structure_nodes_ FOREIGN KEY (structure_node_id) REFERENCES public.product_type_structure_nodes(id),
CONSTRAINT structure_node_product_types_list_product_types_fk FOREIGN KEY (product_type_id) REFERENCES public.product_types(id)
);
COMMENT ON TABLE public.structure_node_product_types_list IS 'Produkte in einem Strukturknoten';
-- Column comments
COMMENT ON COLUMN public.structure_node_product_types_list.product_type_id IS 'Produkte in der Struktur';
-- public.units definition
-- Drop table
-- DROP TABLE public.units;
CREATE TABLE public.units (
id serial4 NOT NULL,
"label" varchar NULL,
description varchar NULL,
unit varchar NULL,
base_unit_id int4 NULL, -- Wenn es eine Ableitung von einer Base-Unit ist, so kann diese hier verlinkt werden und dann wird der base_unit_factor berücksichtigt.
base_unit_factor float4 NULL, -- Von der Bas eaus betrachtet der Faktor, der für die Umrechnung benötigt wird.
CONSTRAINT units_id_not_null NOT NULL id,
CONSTRAINT units_pk PRIMARY KEY (id),
CONSTRAINT units_units_fk FOREIGN KEY (base_unit_id) REFERENCES public.units(id)
);
-- Column comments
COMMENT ON COLUMN public.units.base_unit_id IS 'Wenn es eine Ableitung von einer Base-Unit ist, so kann diese hier verlinkt werden und dann wird der base_unit_factor berücksichtigt.';
COMMENT ON COLUMN public.units.base_unit_factor IS 'Von der Bas eaus betrachtet der Faktor, der für die Umrechnung benötigt wird.';
-- public."values" definition
-- Drop table
-- DROP TABLE public."values";
CREATE TABLE public."values" (
id serial4 NOT NULL,
"label" varchar NULL, -- interne Bezeichnung
int_min_value int4 NULL, -- Kleinster oder einziger int_Wert
int_max_value int4 NULL, -- größter Wert, wenn Range
float_min_value float4 NULL,
float_max_value float4 NULL,
bool_value bool NULL,
value_type_id int4 NOT NULL,
value_translation_id int4 NULL, -- muss nicht gesetzt werden, z.B. bei Zahlen
is_range bool DEFAULT false NULL,
unit_id int4 NULL,
is_terminal bool NULL,
CONSTRAINT value_id_pk PRIMARY KEY (id),
CONSTRAINT values_id_not_null NOT NULL id,
CONSTRAINT values_value_type_id_not_null NOT NULL value_type_id,
CONSTRAINT values_units_fk FOREIGN KEY (unit_id) REFERENCES public.units(id),
CONSTRAINT values_values_type_fk FOREIGN KEY (value_type_id) REFERENCES public.value_types(id)
);
-- Column comments
COMMENT ON COLUMN public."values"."label" IS 'interne Bezeichnung';
COMMENT ON COLUMN public."values".int_min_value IS 'Kleinster oder einziger int_Wert';
COMMENT ON COLUMN public."values".int_max_value IS 'größter Wert, wenn Range';
COMMENT ON COLUMN public."values".value_translation_id IS 'muss nicht gesetzt werden, z.B. bei Zahlen';
-- public.product_type_group_products_types_list definition
-- Drop table
-- DROP TABLE public.product_type_group_products_types_list;
CREATE TABLE public.product_type_group_products_types_list (
product_type_group_id int4 NOT NULL,
product_type_id int4 NOT NULL,
is_mandatory bool DEFAULT false NOT NULL,
CONSTRAINT product_type_group_products_type_product_type_group_id_not_null NOT NULL product_type_group_id,
CONSTRAINT product_type_group_products_types_list_is_mandatory_not_null NOT NULL is_mandatory,
CONSTRAINT product_type_group_products_types_list_product_type_id_not_null NOT NULL product_type_id,
CONSTRAINT product_type_group_products_types_list_product_type_groups_fk FOREIGN KEY (product_type_group_id) REFERENCES public.product_type_groups(id),
CONSTRAINT product_type_group_products_types_list_product_types_fk FOREIGN KEY (product_type_id) REFERENCES public.product_types(id)
);
-- public.product_type_structure_node_translations definition
-- Drop table
-- DROP TABLE public.product_type_structure_node_translations;
CREATE TABLE public.product_type_structure_node_translations (
structure_node_id int4 NOT NULL,
language_id int4 NOT NULL,
"translation" varchar NULL,
CONSTRAINT product_type_structure_node_translat_structure_node_id_not_null NOT NULL structure_node_id,
CONSTRAINT product_type_structure_node_translations_language_id_not_null NOT NULL language_id,
CONSTRAINT product_type_structure_node_translations_languages_fk FOREIGN KEY (language_id) REFERENCES public.languages(id),
CONSTRAINT product_type_structure_node_translations_product_type_structure FOREIGN KEY (structure_node_id) REFERENCES public.product_type_structure_nodes(id)
);
-- public.product_type_values_list definition
-- Drop table
-- DROP TABLE public.product_type_values_list;
CREATE TABLE public.product_type_values_list (
product_type_id int4 NOT NULL,
property_type_id int4 NOT NULL,
value_id int4 NOT NULL,
CONSTRAINT product_type_values_list_product_type_id_not_null NOT NULL product_type_id,
CONSTRAINT product_type_values_list_property_type_id_not_null NOT NULL property_type_id,
CONSTRAINT product_type_values_list_unique UNIQUE (product_type_id, property_type_id),
CONSTRAINT product_type_values_list_value_id_not_null NOT NULL value_id,
CONSTRAINT product_type_values_list_product_types_fk FOREIGN KEY (product_type_id) REFERENCES public.product_types(id),
CONSTRAINT product_type_values_list_property_types_fk FOREIGN KEY (property_type_id) REFERENCES public.property_types(id),
CONSTRAINT product_type_values_list_values_fk FOREIGN KEY (value_id) REFERENCES public."values"(id)
);
-- public.property_type_group_list definition
-- Drop table
-- DROP TABLE public.property_type_group_list;
CREATE TABLE public.property_type_group_list (
property_type_group_id int4 NOT NULL,
property_type_id int4 NOT NULL,
CONSTRAINT property_type_group_list_property_type_group_id_not_null NOT NULL property_type_group_id,
CONSTRAINT property_type_group_list_property_type_id_not_null NOT NULL property_type_id,
CONSTRAINT property_type_group_list_unique UNIQUE (property_type_group_id, property_type_id),
CONSTRAINT property_type_group_list_property_type_groups_fk FOREIGN KEY (property_type_group_id) REFERENCES public.property_type_groups(id),
CONSTRAINT property_type_group_list_property_types_fk FOREIGN KEY (property_type_id) REFERENCES public.property_types(id)
);
COMMENT ON TABLE public.property_type_group_list IS 'Properties einer Produktgruppe';
-- public.property_type_group_translations definition
-- Drop table
-- DROP TABLE public.property_type_group_translations;
CREATE TABLE public.property_type_group_translations (
property_type_group_id int4 NOT NULL,
language_id int4 NOT NULL,
"translation" varchar NULL,
CONSTRAINT property_type_group_translation_property_type_group_id_not_null NOT NULL property_type_group_id,
CONSTRAINT property_type_group_translations_language_id_not_null NOT NULL language_id,
CONSTRAINT property_type_group_translations_unique UNIQUE (property_type_group_id, language_id),
CONSTRAINT property_type_group_translations_languages_fk FOREIGN KEY (language_id) REFERENCES public.languages(id),
CONSTRAINT property_type_group_translations_property_type_group_fk FOREIGN KEY (property_type_group_id) REFERENCES public.property_type_groups(id)
);
-- public.property_type_translations definition
-- Drop table
-- DROP TABLE public.property_type_translations;
CREATE TABLE public.property_type_translations (
property_type_id int4 NOT NULL,
language_id int4 NOT NULL,
"translation" varchar NULL,
CONSTRAINT property_type_translations_language_id_not_null NOT NULL language_id,
CONSTRAINT property_type_translations_unique UNIQUE (property_type_id, language_id),
CONSTRAINT property_type_translations_value_id_not_null NOT NULL property_type_id,
CONSTRAINT property_type_translations_languages_fk FOREIGN KEY (language_id) REFERENCES public.languages(id),
CONSTRAINT property_type_translations_property_types_fk FOREIGN KEY (property_type_id) REFERENCES public.property_types(id)
);
-- public.value_lists definition
-- Drop table
-- DROP TABLE public.value_lists;
CREATE TABLE public.value_lists (
property_type_id int4 NULL,
value_id int4 NULL,
CONSTRAINT value_lists_unique UNIQUE (property_type_id, value_id),
CONSTRAINT value_lists_property_types_fk FOREIGN KEY (property_type_id) REFERENCES public.property_types(id),
CONSTRAINT value_lists_values_fk FOREIGN KEY (value_id) REFERENCES public."values"(id)
);
COMMENT ON TABLE public.value_lists IS 'List of possilbe values';
-- public.value_translations definition
-- Drop table
-- DROP TABLE public.value_translations;
CREATE TABLE public.value_translations (
value_id int4 NOT NULL,
language_id int4 NOT NULL,
"translation" varchar NULL,
CONSTRAINT value_translation_language_id_not_null NOT NULL language_id,
CONSTRAINT value_translation_value_id_not_null NOT NULL value_id,
CONSTRAINT value_translations_unique UNIQUE (value_id, language_id),
CONSTRAINT value_translation_languages_fk FOREIGN KEY (language_id) REFERENCES public.languages(id),
CONSTRAINT value_translation_values_fk FOREIGN KEY (value_id) REFERENCES public."values"(id)
);
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
Binary file not shown.

After

Width:  |  Height:  |  Size: 146 KiB

@@ -0,0 +1,93 @@
<mxfile host="Electron">
<diagram name="Seite-1" id="9Zxhygs23LEFz1mY9FFR">
<mxGraphModel dx="861" dy="536" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="6vCj93C7Czp6OVA-g9T0-1" parent="1" style="text;html=1;whiteSpace=wrap;overflow=hidden;rounded=0;" value="&lt;h1 style=&quot;margin-top: 0px;&quot;&gt;Architektur Simply CPQ&amp;nbsp;&lt;/h1&gt;&lt;div&gt;V0.1 - 2026.07.23&lt;/div&gt;&lt;p&gt;In diesem Diagram wird die grundlegende Architektur von Simply CPQ beschrieben.&lt;/p&gt;&lt;p&gt;Die Lösung besteht aus zwei Applikationen:&amp;nbsp;&lt;br&gt;&lt;span style=&quot;background-color: transparent; color: light-dark(rgb(0, 0, 0), rgb(255, 255, 255));&quot;&gt;- Simply CPQ Logical Editor (Datenpflege und Importe)&lt;br&gt;- Simply CPQ Quote Editor (Angebotserstellung)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;" vertex="1">
<mxGeometry height="170" width="320" x="40" y="40" as="geometry" />
</mxCell>
<mxCell id="6vCj93C7Czp6OVA-g9T0-13" edge="1" parent="1" source="6vCj93C7Czp6OVA-g9T0-3" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;startArrow=classicThin;startFill=1;" target="6vCj93C7Czp6OVA-g9T0-4">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="6vCj93C7Czp6OVA-g9T0-3" parent="1" style="html=1;strokeWidth=2;shape=manualInput;boundedLbl=1;whiteSpace=wrap;rounded=1;size=26;arcSize=11;" value="Logical Editor&lt;div&gt;Datenpflege&lt;/div&gt;" vertex="1">
<mxGeometry height="60" width="100" x="90" y="290" as="geometry" />
</mxCell>
<mxCell id="6vCj93C7Czp6OVA-g9T0-14" edge="1" parent="1" source="6vCj93C7Czp6OVA-g9T0-4" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.25;entryY=0;entryDx=0;entryDy=0;startArrow=classicThin;startFill=1;" target="6vCj93C7Czp6OVA-g9T0-5">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="6vCj93C7Czp6OVA-g9T0-4" parent="1" style="rounded=0;whiteSpace=wrap;html=1;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=12;fontColor=default;fillColor=default;" value="Logical Editor&amp;nbsp;&lt;div&gt;HTTP-Controller&lt;/div&gt;" vertex="1">
<mxGeometry height="60" width="120" x="80" y="390" as="geometry" />
</mxCell>
<mxCell id="6vCj93C7Czp6OVA-g9T0-15" edge="1" parent="1" source="6vCj93C7Czp6OVA-g9T0-5" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.25;exitY=1;exitDx=0;exitDy=0;entryX=0.25;entryY=0;entryDx=0;entryDy=0;startArrow=classicThin;startFill=1;" target="6vCj93C7Czp6OVA-g9T0-6">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="6vCj93C7Czp6OVA-g9T0-21" edge="1" parent="1" source="6vCj93C7Czp6OVA-g9T0-5" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.75;exitY=1;exitDx=0;exitDy=0;entryX=0.75;entryY=0;entryDx=0;entryDy=0;startArrow=classicThin;startFill=1;" target="6vCj93C7Czp6OVA-g9T0-6">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="6vCj93C7Czp6OVA-g9T0-5" parent="1" style="rounded=0;whiteSpace=wrap;html=1;" value="&lt;div&gt;&lt;span style=&quot;background-color: transparent; color: light-dark(rgb(0, 0, 0), rgb(255, 255, 255));&quot;&gt;Service layer&lt;/span&gt;&lt;/div&gt;" vertex="1">
<mxGeometry height="60" width="520" x="80" y="480" as="geometry" />
</mxCell>
<mxCell id="6vCj93C7Czp6OVA-g9T0-6" parent="1" style="rounded=0;whiteSpace=wrap;html=1;" value="Repository Layer" vertex="1">
<mxGeometry height="60" width="520" x="80" y="570" as="geometry" />
</mxCell>
<mxCell id="6vCj93C7Czp6OVA-g9T0-20" edge="1" parent="1" source="6vCj93C7Czp6OVA-g9T0-7" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.75;entryY=0;entryDx=0;entryDy=0;startArrow=classicThin;startFill=1;" target="6vCj93C7Czp6OVA-g9T0-5">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="6vCj93C7Czp6OVA-g9T0-7" parent="1" style="rounded=0;whiteSpace=wrap;html=1;strokeColor=default;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=12;fontColor=default;fillColor=default;" value="Quote Editor&amp;nbsp;&lt;div&gt;HTTP-Controller&lt;/div&gt;" vertex="1">
<mxGeometry height="60" width="120" x="480" y="390" as="geometry" />
</mxCell>
<mxCell id="6vCj93C7Czp6OVA-g9T0-18" edge="1" parent="1" source="6vCj93C7Czp6OVA-g9T0-8" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;startArrow=classicThin;startFill=1;" target="6vCj93C7Czp6OVA-g9T0-7">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="6vCj93C7Czp6OVA-g9T0-8" parent="1" style="html=1;strokeWidth=2;shape=manualInput;boundedLbl=1;whiteSpace=wrap;rounded=1;size=26;arcSize=11;" value="Quote Editor&lt;div&gt;Frontend&lt;/div&gt;" vertex="1">
<mxGeometry height="60" width="100" x="490" y="290" as="geometry" />
</mxCell>
<mxCell id="6vCj93C7Czp6OVA-g9T0-9" parent="1" style="shape=cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;size=15;" value="Document&lt;div&gt;Templates&lt;/div&gt;" vertex="1">
<mxGeometry height="80" width="60" x="640" y="380" as="geometry" />
</mxCell>
<mxCell id="6vCj93C7Czp6OVA-g9T0-10" parent="1" style="shape=cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;size=15;" value="Master Data" vertex="1">
<mxGeometry height="80" width="60" x="110" y="670" as="geometry" />
</mxCell>
<mxCell id="6vCj93C7Czp6OVA-g9T0-17" edge="1" parent="1" source="6vCj93C7Czp6OVA-g9T0-11" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.75;entryY=1;entryDx=0;entryDy=0;" target="6vCj93C7Czp6OVA-g9T0-6">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="6vCj93C7Czp6OVA-g9T0-11" parent="1" style="shape=cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;size=15;" value="Master Data" vertex="1">
<mxGeometry height="80" width="60" x="420" y="670" as="geometry" />
</mxCell>
<mxCell id="6vCj93C7Czp6OVA-g9T0-12" parent="1" style="shape=cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;size=15;" value="Runtime Data" vertex="1">
<mxGeometry height="80" width="60" x="540" y="670" as="geometry" />
</mxCell>
<mxCell id="6vCj93C7Czp6OVA-g9T0-16" edge="1" parent="1" source="6vCj93C7Czp6OVA-g9T0-6" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.25;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;entryPerimeter=0;startArrow=classicThin;startFill=1;" target="6vCj93C7Czp6OVA-g9T0-10">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="6vCj93C7Czp6OVA-g9T0-22" edge="1" parent="1" source="6vCj93C7Czp6OVA-g9T0-6" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.75;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;entryPerimeter=0;startArrow=classicThin;startFill=1;" target="6vCj93C7Czp6OVA-g9T0-12">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="6vCj93C7Czp6OVA-g9T0-23" edge="1" parent="1" source="6vCj93C7Czp6OVA-g9T0-10" style="shape=flexArrow;endArrow=classic;html=1;rounded=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;entryPerimeter=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;exitPerimeter=0;" target="6vCj93C7Czp6OVA-g9T0-11" value="">
<mxGeometry height="50" relative="1" width="50" as="geometry">
<mxPoint x="230" y="730" as="sourcePoint" />
<mxPoint x="280" y="680" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="6vCj93C7Czp6OVA-g9T0-24" connectable="0" parent="6vCj93C7Czp6OVA-g9T0-23" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" value="Replicate" vertex="1">
<mxGeometry relative="1" x="-0.168" y="-1" as="geometry">
<mxPoint y="1" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="6vCj93C7Czp6OVA-g9T0-25" edge="1" parent="1" style="endArrow=none;dashed=1;html=1;dashPattern=1 3;strokeWidth=2;rounded=0;" value="">
<mxGeometry height="50" relative="1" width="50" as="geometry">
<mxPoint x="340" y="750" as="sourcePoint" />
<mxPoint x="340" y="280" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="6vCj93C7Czp6OVA-g9T0-26" parent="1" style="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;rounded=0;" value="Build-Time" vertex="1">
<mxGeometry height="30" width="60" x="220" y="320" as="geometry" />
</mxCell>
<mxCell id="6vCj93C7Czp6OVA-g9T0-27" parent="1" style="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;rounded=0;" value="Runtime" vertex="1">
<mxGeometry height="30" width="60" x="370" y="320" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>
+44
View File
@@ -0,0 +1,44 @@
# Use Cases Simply CPQ
Ziel von Simply CPQ ist es, ein Werkzeug für den Vertrieb eines Unternehmens bereit zu stellen, mit dem Angebote für komplexe, variantenreiche Produkte und Lösungen schnell, fehlerfrei, zum korrekten Preis erstellt werden können.
## Logical Editor
Der Logical Editor dient zum Erfassen von Daten, Produkten, Preisen, Merkmalen und Logiken der anzubietenden Produkte und Lösungen.
### Sprachen
#### Sprachen verwalten:
Ich als User kann neue Sprachen anlegen, löschen und ändern. Löschen kann ich eine Sprache nur, wenn sie nicht verwendet wird
#### Übersetzungen pflegen:
Für folgende Daten kann ich Übersetzungen einpflegen, löschen und ändern:
- Werte
- Merkmale
- Merkmalsgruppen
- Produkte
- Produktgruppen
- Spaltenamen
- Strukturknoten von Lösungen
### Merkmale
Merkmale werden global definiert und strukturiert. Sie können Produktgruppen zugeordnet werden und damit werden sich auch automatisch allen Produkten und Produktgruppen unterhalb dieser Produktgruppe zugeordnet. Merkmale können mögliche Werte, Wertemengen oder MinMax-Werte beinhalten, je nach Typ des Merkmals.
#### Merkmalsgruppen pflegen
Ich kann Merkmalsgruppen anlegen, löschen (sofern leer) und ändern. Diese Gruppen dienen der Strukturierung des Merkmalspools. Merkmalsgruppen können beliebig tief verschachtelt werden.
#### Merkmalswert pflegen
Ich kann Werte anlegen, pflegen und löschen. Die Werte kann ich Merkmalen zuordnen, wenn der Werte-Typ identisch ist.
#### Merkmale pflegen
Ich kann Merkmale anlegen, pflegen und löschen (wenn sie nicht in Verwendung sind). Ein Merkmal kann ich einen Bezeichner geben. Ein Merkmal kann ich einer Merkmalsgruppe zuordnen. Ich kann sehen, in welchen Produkten und Produktgruppen ein Merkmal verwendet wird. Ich kann einem Merkmal einen Wert, einen Wertebereich oder eine Liste möglicher Werte mitgeben. In den letzten Fällen muss dann dieses Merkmal bei der Auswahl eines Produktes mit diesem Merkmal der terminale Wert im Konfigurator bestimmt werden.
### Datenbank-Sicherungen
#### Sicherung erstellen:
Ich als Administrator kann zu jedem Zeitpunkt eine Sicherung der Master-Data Datenbank vornehmen. Ich führe dieses manuell aus.
#### Sicherungen öffnen:
Ich als Adminstrator kann eine Instanz des Logical Editors mit einer Sicherungsdatenbank verbinden und öffnen. Hiermit kann ich mir den Versionsstand zu einem definierten Zeitpunkt der Datenbank anschauen
## Quote Editor
Der Quote Editor dient zur Erstellung von Angeboten auf Basis der gepflegten Daten und Logiken.
+2
View File
@@ -0,0 +1,2 @@
# Simply CPQ Runtime Client
Dieser Ordner enthält alle relevanten Dateien und Informationen zum Simply CPQ Runtime Client. Dieser dient dem Schreiben von Angeboten.
+2
View File
@@ -0,0 +1,2 @@
# Simply CPQ Runtime Server
Dieses Verzeichnis enthält alle Simply CPQ Runtime Server relevanten Dateien und Informationen.