-- ============================================================================
-- Copyright (C) 2026 Alles Watt lauft
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- Table for storing customer favorite products
-- ============================================================================

CREATE TABLE llx_kundenkarte_favorite_products
(
    rowid               integer AUTO_INCREMENT PRIMARY KEY,
    entity              integer DEFAULT 1 NOT NULL,

    fk_soc              integer NOT NULL,
    fk_product          integer NOT NULL,

    qty                 double(24,8) DEFAULT 1 NOT NULL,

    rang                integer DEFAULT 0,
    note                text,

    active              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;
