-- Discount banner cards shown by the store home page (DiscountBanner.jsx).
-- Managed by admins via Admin/banner/banner_product.php.
CREATE TABLE IF NOT EXISTS banner_products (
    id INT AUTO_INCREMENT PRIMARY KEY,
    product_id INT NULL,
    title VARCHAR(255) NOT NULL,
    description TEXT,
    tag VARCHAR(100) DEFAULT '',
    promocode VARCHAR(50) DEFAULT '',
    discount_percentage DECIMAL(5,2) DEFAULT NULL,
    image_url VARCHAR(255) DEFAULT '',
    is_active TINYINT(1) NOT NULL DEFAULT 1,
    display_order INT NOT NULL DEFAULT 0,
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    updated_at TIMESTAMP NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP
);
