From faf9adf8b038553d40d530302e7881fd71c50558 Mon Sep 17 00:00:00 2001 From: fcarraUniSa Date: Tue, 17 Feb 2026 10:40:49 +0100 Subject: [PATCH] Update schema.sql --- backend/schema.sql | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/backend/schema.sql b/backend/schema.sql index 532e3e6..3678a92 100644 --- a/backend/schema.sql +++ b/backend/schema.sql @@ -127,4 +127,24 @@ INSERT INTO survey_results (id, rating, comment, source, reference_id, timestamp ('s3', 5, 'AI molto intelligente, ha risolto subito.', 'chat', NULL, '2023-12-03 09:15:00'), ('s4', 2, 'Non ha capito la mia domanda.', 'chat', NULL, '2023-12-01 14:20:00'); +-- 8. TABELLA SETTINGS (Configurazione Globale) +DROP TABLE IF EXISTS settings; +CREATE TABLE settings ( + id INT PRIMARY KEY DEFAULT 1, + branding JSON, + smtp JSON, + email_templates JSON, + features JSON, + ai_config JSON +); + +INSERT INTO settings (id, branding, smtp, email_templates, features, ai_config) VALUES ( + 1, + '{"appName": "OmniSupport AI", "primaryColor": "#0284c7", "logoUrl": "https://via.placeholder.com/150"}', + '{"host": "smtp.example.com", "port": 587, "user": "notifications@omnisupport.ai", "pass": "password", "secure": true, "fromEmail": "noreply@omnisupport.ai"}', + '[{"id": "t1", "name": "Conferma Apertura Ticket", "trigger": "ticket_created", "audience": "client", "subject": "Ticket #{ticket_id} Creato", "body": "Grazie per averci contattato.", "isActive": true}]', + '{"kbEnabled": true, "maxKbArticles": 50, "maxSupervisors": 2, "aiKnowledgeAgentEnabled": true, "maxAiGeneratedArticles": 10, "maxAgents": 10}', + '{"provider": "gemini", "apiKey": "", "model": "gemini-3-flash-preview", "isActive": true}' +); + SET FOREIGN_KEY_CHECKS = 1;