-- ============================================================
-- NICC Botones - Database Schema
-- Configuracion de botones para menus visuales del sistema
-- ============================================================

CREATE TABLE IF NOT EXISTS button_config (
    id INTEGER PRIMARY KEY AUTOINCREMENT,
    plugin TEXT NOT NULL,
    group_name TEXT NOT NULL DEFAULT 'main',
    sort_order INTEGER NOT NULL DEFAULT 0,
    icon TEXT NOT NULL DEFAULT '',
    emoji TEXT NOT NULL DEFAULT '',
    text TEXT NOT NULL,
    link TEXT NOT NULL,
    font_family TEXT NOT NULL DEFAULT 'Montserrat',
    font_size TEXT NOT NULL DEFAULT '',
    font_weight TEXT NOT NULL DEFAULT '',
    extra_json TEXT NOT NULL DEFAULT '{}',
    is_active INTEGER NOT NULL DEFAULT 1,
    created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
    updated_at DATETIME DEFAULT CURRENT_TIMESTAMP
);

CREATE INDEX IF NOT EXISTS idx_button_plugin ON button_config(plugin, group_name, sort_order);
