-- Copyright (C) 2026 Eduard Wisch <data@data-it-solution.de>
--
-- Transaktionslog für IDS Connect
--

CREATE TABLE llx_idsconnect_log (
    rowid           integer AUTO_INCREMENT PRIMARY KEY,
    fk_supplier     integer NOT NULL,
    fk_user         integer NOT NULL,
    action_type     varchar(10) NOT NULL,
    direction       varchar(10) NOT NULL DEFAULT 'OUT',
    request_data    text,
    response_data   text,
    cart_xml        mediumtext,
    status          varchar(20) NOT NULL DEFAULT 'pending',
    error_message   text,
    callback_token  varchar(128),
    fk_commande     integer DEFAULT NULL,
    ip_address      varchar(45),
    date_creation   datetime NOT NULL,
    tms             timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    entity          integer DEFAULT 1 NOT NULL
) ENGINE=InnoDB;
