-- ===================================================== -- Seeds DEV: notification_templates -- Schema: notifications -- Descripción: Plantillas para desarrollo y testing (incluye templates de producción + test templates) -- Relacionado: EXT-003 (Notificaciones Multi-Canal) -- Fecha: 2025-11-13 -- ===================================================== -- -- NOTA: Este archivo incluye todas las plantillas de producción -- más plantillas adicionales para testing y desarrollo -- -- ===================================================== -- Cargar primero todas las plantillas de producción \ir ../../prod/notifications/01-notification_templates.sql -- Templates adicionales para DEV/TESTING -- Template TEST 1: Notificación de prueba simple INSERT INTO notifications.notification_templates ( template_key, name, description, subject_template, body_template, html_template, variables, default_channels, is_active ) VALUES ( 'test_notification', '[TEST] Notificación de Prueba', 'Template simple para testing de sistema de notificaciones', 'Test: {{test_type}}', 'Esto es una notificación de prueba. Tipo: {{test_type}} Timestamp: {{timestamp}} Usuario: {{user_id}} Este template se usa solo para testing.', '
Test notification: {{test_type}}
Timestamp: {{timestamp}}
', '["test_type", "timestamp", "user_id"]'::jsonb, ARRAY['in_app'], true ); -- Template TEST 2: Notificación con todas las variables posibles INSERT INTO notifications.notification_templates ( template_key, name, description, subject_template, body_template, html_template, variables, default_channels, is_active ) VALUES ( 'test_all_variables', '[TEST] Template con Todas las Variables', 'Template de testing que usa múltiples variables para validar interpolación', 'Test completo: {{title}}', 'Usuario: {{user_name}} ({{user_email}}) Profesor: {{teacher_name}} Asignación: {{assignment_title}} Módulo: {{module_name}} Puntaje: {{score}} XP: {{xp_earned}} Coins: {{ml_coins_earned}} Fecha: {{date}}', 'Esta notificación se envía por múltiples canales:
Test ID: {{test_id}}
Canales: {{channels}}
', '["test_id", "channels", "channel_test"]'::jsonb, ARRAY['in_app', 'email', 'push'], true ); -- Comentario final para DEV COMMENT ON TABLE notifications.notification_templates IS 'Contiene 11 plantillas (8 prod + 3 test) para notificaciones del sistema (DB-115 DEV - 2025-11-13)';