-- ============================================================================
-- SEED: Prediction Packages
-- DESCRIPTION: Paquetes de predicciones ML para marketplace
-- VERSION: 1.0.0
-- CREATED: 2026-01-10
-- ============================================================================

INSERT INTO ml.prediction_packages (
    name, slug, description,
    model_id, model_name, prediction_count,
    included_symbols, included_timeframes,
    price, compare_price, validity_days,
    badge, is_popular, sort_order, is_active
) VALUES
-- AMD Detector Packages
(
    'AMD Detector - Starter',
    'amd-starter',
    'Pack inicial de 10 predicciones AMD. Perfecto para probar el modelo.',
    'amd_detector',
    'AMD Detector v2.0',
    10,
    NULL,  -- Todos los símbolos
    ARRAY['H1', 'H4', 'D1'],
    29.00, 39.00, 30,
    NULL, FALSE, 1, TRUE
),
(
    'AMD Detector - Pro',
    'amd-pro',
    'Pack profesional de 50 predicciones AMD. Incluye todos los símbolos y timeframes.',
    'amd_detector',
    'AMD Detector v2.0',
    50,
    NULL,
    ARRAY['M15', 'H1', 'H4', 'D1'],
    119.00, 145.00, 60,
    'Best Value', TRUE, 2, TRUE
),
(
    'AMD Detector - Enterprise',
    'amd-enterprise',
    'Pack empresarial de 200 predicciones AMD para traders de alto volumen.',
    'amd_detector',
    'AMD Detector v2.0',
    200,
    NULL,
    ARRAY['M15', 'H1', 'H4', 'D1', 'W1'],
    399.00, 580.00, 90,
    'Enterprise', FALSE, 3, TRUE
),

-- Range Predictor Packages
(
    'Range Predictor - Starter',
    'range-starter',
    'Pack inicial de 10 predicciones de rango. Ideal para trading de S/R.',
    'range_predictor',
    'Range Predictor v1.5',
    10,
    NULL,
    ARRAY['H1', 'H4', 'D1'],
    24.00, 34.00, 30,
    NULL, FALSE, 4, TRUE
),
(
    'Range Predictor - Pro',
    'range-pro',
    'Pack profesional de 50 predicciones de rango.',
    'range_predictor',
    'Range Predictor v1.5',
    50,
    NULL,
    ARRAY['M15', 'H1', 'H4', 'D1'],
    99.00, 120.00, 60,
    NULL, FALSE, 5, TRUE
),

-- TPSL Classifier Packages
(
    'TPSL Classifier - Starter',
    'tpsl-starter',
    'Pack inicial de 20 clasificaciones TP/SL óptimas.',
    'tpsl_classifier',
    'TPSL Classifier v1.2',
    20,
    NULL,
    ARRAY['H1', 'H4', 'D1'],
    49.00, 59.00, 45,
    NULL, FALSE, 6, TRUE
),
(
    'TPSL Classifier - Pro',
    'tpsl-pro',
    'Pack profesional de 100 clasificaciones TP/SL.',
    'tpsl_classifier',
    'TPSL Classifier v1.2',
    100,
    NULL,
    ARRAY['M15', 'H1', 'H4', 'D1'],
    199.00, 245.00, 90,
    NULL, TRUE, 7, TRUE
),

-- ICT/SMC Detector Packages (VIP Only)
(
    'ICT/SMC Detector - Gold',
    'ict-smc-gold',
    'Pack de 30 detecciones ICT/SMC para traders VIP Gold+.',
    'ict_smc_detector',
    'ICT/SMC Detector v1.0',
    30,
    NULL,
    ARRAY['H1', 'H4', 'D1'],
    149.00, 179.00, 45,
    'VIP Only', FALSE, 8, TRUE
),

-- Strategy Ensemble Packages (Diamond Only)
(
    'Strategy Ensemble - Diamond',
    'ensemble-diamond',
    'Pack exclusivo de 50 predicciones Ensemble combinando todos los modelos.',
    'strategy_ensemble',
    'Strategy Ensemble v1.0',
    50,
    NULL,
    ARRAY['H1', 'H4', 'D1'],
    299.00, 399.00, 60,
    'Diamond Exclusive', FALSE, 9, TRUE
),

-- Combo Packages
(
    'Combo Trader - Básico',
    'combo-basico',
    'Combo de AMD + Range + TPSL. 30 predicciones totales.',
    'combo_basic',
    'AMD + Range + TPSL',
    30,
    NULL,
    ARRAY['H1', 'H4', 'D1'],
    79.00, 102.00, 30,
    'Best Starter', TRUE, 10, TRUE
),
(
    'Combo Trader - Avanzado',
    'combo-avanzado',
    'Combo completo con todos los modelos básicos. 100 predicciones.',
    'combo_advanced',
    'AMD + Range + TPSL + ICT',
    100,
    NULL,
    ARRAY['M15', 'H1', 'H4', 'D1'],
    249.00, 320.00, 60,
    'Pro Trader', FALSE, 11, TRUE
)
ON CONFLICT (slug) DO UPDATE SET
    name = EXCLUDED.name,
    description = EXCLUDED.description,
    price = EXCLUDED.price,
    compare_price = EXCLUDED.compare_price,
    prediction_count = EXCLUDED.prediction_count,
    validity_days = EXCLUDED.validity_days,
    badge = EXCLUDED.badge,
    is_popular = EXCLUDED.is_popular,
    updated_at = NOW();
