-- ============================================================================ -- Copyright (C) 2026 Alles Watt lauft -- -- Table for equipment instances (Sicherungsautomaten, FI-Schalter, etc.) -- Equipment is placed on a carrier (Hutschiene) at a specific position -- ============================================================================ CREATE TABLE llx_kundenkarte_equipment ( rowid integer AUTO_INCREMENT PRIMARY KEY, entity integer DEFAULT 1 NOT NULL, fk_carrier integer NOT NULL COMMENT 'Traeger/Hutschiene', fk_equipment_type integer NOT NULL COMMENT 'Equipment-Typ', label varchar(255) COMMENT 'Optionale Beschriftung/Stromkreis', -- Positionierung auf dem Traeger position_te integer NOT NULL COMMENT 'Startposition in TE (0-basiert)', width_te integer NOT NULL COMMENT 'Breite in TE (vom Typ oder ueberschrieben)', -- Flexible Felder (JSON) field_values text, -- Optionale Produkt-Verknuepfung (ueberschreibt Typ-Produkt) fk_product integer DEFAULT NULL COMMENT 'Spezifisches Dolibarr-Produkt', note_private text, status tinyint DEFAULT 1 NOT NULL, date_creation datetime, tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer, fk_user_modif integer, import_key varchar(14) ) ENGINE=innodb;