-- ============================================================================
-- Copyright (C) 2026 Alles Watt lauft
--
-- Dictionary table for installation system categories
-- ============================================================================

CREATE TABLE llx_c_kundenkarte_anlage_system
(
    rowid               integer AUTO_INCREMENT PRIMARY KEY,
    entity              integer DEFAULT 0 NOT NULL,

    code                varchar(32) NOT NULL,
    label               varchar(128) NOT NULL,
    description         text,

    picto               varchar(64),
    color               varchar(8),

    -- Tree display configuration (JSON)
    tree_display_config text COMMENT 'JSON config for tree display options',

    -- Verfügbare Ansichten: tree, graph, both
    view_modes          varchar(20) NOT NULL DEFAULT 'both',

    position            integer DEFAULT 0,
    active              tinyint DEFAULT 1 NOT NULL
) ENGINE=innodb;
