-- Adminer 5.2.1 MySQL 8.4.5 dump

SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';


CREATE TABLE `admin_settings` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `setting_name` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `setting_value` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `setting_name` (`setting_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

INSERT INTO `admin_settings` (`id`, `setting_name`, `setting_value`) VALUES
(1,	'sitepal_enabled',	'0'),
(2,	'site_language',	'en_US');

CREATE TABLE `ai_models` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `ai_provider_id` int unsigned NOT NULL,
  `model_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `model_code` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  PRIMARY KEY (`id`),
  KEY `ai_provider_id` (`ai_provider_id`),
  CONSTRAINT `ai_models_ibfk_1` FOREIGN KEY (`ai_provider_id`) REFERENCES `ai_providers` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

INSERT INTO `ai_models` (`id`, `ai_provider_id`, `model_name`, `model_code`) VALUES
(1,	1,	'GPT-4 Turbo',	'gpt-4-turbo'),
(2,	1,	'GPT-4o',	'gpt-4o'),
(3,	1,	'GPT-4',	'gpt-4'),
(4,	1,	'GPT-4o-mini',	'gpt-4o-mini'),
(5,	5,	'Llama 3.1',	'llama3.1'),
(6,	3,	'Gemini 1.5 Flash',	'gemini-1.5-flash'),
(7,	3,	'Gemini 2.0 Flash',	'gemini-2.0-flash'),
(8,	3,	'Gemini 1.5 Pro',	'gemini-1.5-pro'),
(9,	3,	'Gemini 2.0 Flash-Lite',	'gemini-2.0-flash-lite');

CREATE TABLE `ai_providers` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `provider_name` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

INSERT INTO `ai_providers` (`id`, `provider_name`) VALUES
(1,	'OpenAI'),
(2,	'Meta'),
(3,	'Google'),
(4,	'Anthropic'),
(5,	'Automotive LLM');

CREATE TABLE `avatars` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `value` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `avatar_name` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `gender` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'm' COMMENT 'm=male, f=femail, o=other',
  `image` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `sitepal_code` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `is_default` tinyint(1) NOT NULL DEFAULT '0' COMMENT '1=true, 0=false',
  `date_added` datetime NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `value` (`value`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

INSERT INTO `avatars` (`id`, `value`, `avatar_name`, `gender`, `image`, `sitepal_code`, `is_default`, `date_added`) VALUES
(1,	'm1',	'Ethan',	'm',	'sitepal-avatar-male-1.jpg',	'AC_VHost_Embed(8738872,250,300,\"\",1,1,2766351,0,1,0,\"r7GSDrBpylEnbF1bvGdUJ5Qk2TQ9KE5k\",0,0)',	0,	'2024-03-18 12:21:50'),
(2,	'm2',	'Marcus',	'm',	'sitepal-avatar-male-2.jpg',	'AC_VHost_Embed(8738872,250,300,\"\",1,1,2766353,0,1,0,\"XxdmbmrBjaN1vriSS1DgqyLHGjOkymMN\",0,0)',	0,	'2024-03-18 12:21:50'),
(3,	'm3',	'Julian',	'm',	'sitepal-avatar-male-3.jpg',	'AC_VHost_Embed(8738872,250,300,\"\",1,1,2766695,0,1,0,\"5Vm8RIIxlEJjW2DKvmAbKDYMOzCJhVmv\",0,0)',	0,	'2024-03-18 12:21:50'),
(4,	'm4',	'Alexander',	'm',	'sitepal-avatar-male-4.jpg',	'AC_VHost_Embed(8738872,250,300,\"\",1,1,2766696,0,1,0,\"UnN64PwdyaPJa9iDKQp0naW4HBAtMGxO\",0,0)',	1,	'2024-03-18 12:21:50'),
(5,	'm5',	'William',	'm',	'sitepal-avatar-male-5.jpg',	'AC_VHost_Embed(8738872,250,300,\"\",1,1,2769126,0,1,0,\"FNDY9FFIvrsL2VR41sFrQQMnC0DEdxKH\",0,0)',	0,	'2024-03-18 12:21:50'),
(6,	'm6',	'James',	'm',	'sitepal-avatar-male-6.jpg',	'AC_VHost_Embed(8738872,250,300,\"\",1,1,2769125,0,1,0,\"jluPAdHGKgkKFE6cBu1NTOVSDNiRgWng\",0,0)',	0,	'2024-03-18 12:21:50'),
(7,	'm7',	'Mario',	'm',	'sitepal-avatar-male-7.jpg',	'AC_VHost_Embed(8738872,250,300,\"\",1,1,2767988,0,1,0,\"GSo9yseDgFD6d5iLfKlIZLa6pQZjnXjy\",0,0)',	0,	'2024-03-18 12:21:50'),
(9,	'm9',	'Chen Yu',	'm',	'sitepal-avatar-male-9.jpg',	'AC_VHost_Embed(8738872,250,300,\"\",1,1,2768115,0,1,0,\"QZ5bOOcuXqP6JB2U5lfrW2QmgP5Y0KUb\",0,0)',	0,	'2024-03-18 12:21:50'),
(10,	'm10',	'Zhang Min',	'm',	'sitepal-avatar-male-10.jpg',	'AC_VHost_Embed(8738872,250,300,\"\",1,1,2768116,0,1,0,\"EIP5h6HLseKiqAEqQeGsjgWKozIFLPev\",0,0)',	0,	'2024-03-18 12:21:50'),
(12,	'm12',	'Tae Min',	'm',	'sitepal-avatar-male-12.jpg',	'AC_VHost_Embed(8738872,250,300,\"\",1,1,2768253,0,1,0,\"64aVtEjPKKozEKfVWURKG4xAkrywONw4\",0,0)',	0,	'2024-03-18 12:21:50'),
(13,	'm13',	'Jun Seo',	'm',	'sitepal-avatar-male-13.jpg',	'AC_VHost_Embed(8738872,250,300,\"\",1,1,2768254,0,1,0,\"SVYYXhKjpa6yxOtQly53SwieprvCLj2d\",0,0)',	0,	'2024-03-18 12:21:50'),
(14,	'm14',	'Yong Sun',	'm',	'sitepal-avatar-male-14.jpg',	'AC_VHost_Embed(8738872,250,300,\"\",1,1,2768255,0,1,0,\"n0BI6bKMQ7JGgiMWW3PevymiccCrgDpG\",0,0)',	0,	'2024-03-18 12:21:50'),
(15,	'f2',	'Sophia',	'f',	'sitepal-avatar-female-2.jpg',	'AC_VHost_Embed(8738872,250,300,\"\",1,1,2766352,0,1,0,\"LvhRvcZZL7pPeAdmoIDUagAfxyjLuP9a\",0,0)',	0,	'2024-03-18 12:21:50'),
(16,	'f3',	'Amelia',	'f',	'sitepal-avatar-female-3.jpg',	'AC_VHost_Embed(8738872,250,300,\"\",1,1,2766698,0,1,0,\"QB7AkH0mOeVpxeGAczfgUXuJpC56myG1\",0,0)',	0,	'2024-03-18 12:21:50'),
(17,	'f4',	'Isabella',	'f',	'sitepal-avatar-female-4.jpg',	'AC_VHost_Embed(8738872,250,300,\"\",1,1,2766699,0,1,0,\"AFGruO8tyuQIJsqGdtiFHQtb7icHWztz\",0,0)',	0,	'2024-03-18 12:21:50'),
(18,	'f5',	'Charlotte',	'f',	'sitepal-avatar-female-5.jpg',	'AC_VHost_Embed(8738872,250,300,\"\",1,1,2766700,0,1,0,\"oUBhYzsMMele8LdlJbRyrqDrwkkOWfMD\",0,0)',	0,	'2024-03-18 12:21:50'),
(19,	'f6',	'Ava',	'f',	'sitepal-avatar-female-6.jpg',	'AC_VHost_Embed(8738872,250,300,\"\",1,1,2769127,0,1,0,\"yLI53UMMoksGK2LW1nSaW5Nb6dK9BTZz\",0,0)',	0,	'2024-03-18 12:21:50'),
(20,	'f7',	'Carolina',	'f',	'sitepal-avatar-female-7.jpg',	'AC_VHost_Embed(8738872,250,300,\"\",1,1,2769129,0,1,0,\"D4MgzVurxGaiFcapwzgO9J2hmaE6HfxE\",0,0)',	0,	'2024-03-18 12:21:50'),
(21,	'f8',	'Emma',	'f',	'sitepal-avatar-female-8.jpg',	'AC_VHost_Embed(8738872,250,300,\"\",1,1,2769128,0,1,0,\"2MlpqAgDSK2Q4lgN4DxWzqS9HBBNU7Dq\",0,0)',	0,	'2024-03-18 12:21:50'),
(22,	'f9',	'Reema',	'f',	'sitepal-avatar-female-9.jpg',	'AC_VHost_Embed(8738872,250,300,\"\",1,1,2770725,0,1,0,\"L7BwAQmTrCXnYJL9P6hydb8M8RSwRYVq\",0,0)',	0,	'2024-11-21 11:25:23'),
(23,	'f10',	'Sara',	'f',	'sitepal-avatar-female-10.jpg',	'AC_VHost_Embed(8738872,250,300,\"\",1,1,2770720,0,1,0,\"FBuagKytekuurwpPyEPrHx8NVVbnahUZ\",0,0)',	0,	'2024-11-21 11:25:24'),
(24,	'f11',	'Maria',	'f',	'sitepal-avatar-female-11.jpg',	'AC_VHost_Embed(8738872,250,300,\"\",1,1,2770721,0,1,0,\"Ls5W2GsTUNYfB8plwJVN187in6wJCZyY\",0,0)',	0,	'2024-11-21 11:25:24'),
(25,	'f12',	'Rosa',	'f',	'sitepal-avatar-female-12.jpg',	'AC_VHost_Embed(8738872,250,300,\"\",1,1,2770722,0,1,0,\"LHNY1EDSR2o7DzEb9c99CfpiITgMUeXI\",0,0)',	0,	'2024-11-21 11:25:24'),
(26,	'f13',	'Ana',	'f',	'sitepal-avatar-female-13.jpg',	'AC_VHost_Embed(8738872,250,300,\"\",1,1,2770723,0,1,0,\"dFd8m1r9Dokhv9eXAHbcEb9kRofiuDs8\",0,0)',	0,	'2024-11-21 11:25:24'),
(27,	'f14',	'Carmen',	'f',	'sitepal-avatar-female-14.jpg',	'AC_VHost_Embed(8738872,250,300,\"\",1,1,2770724,0,1,0,\"4b2uCIxiVuEDIFYomh5uRIA89LLM1hIB\",0,0)',	0,	'2024-11-21 11:25:24'),
(28,	'f15',	'Juana',	'f',	'sitepal-avatar-female-15.jpg',	'AC_VHost_Embed(8738872,250,300,\"\",1,1,2770719,0,1,0,\"g0rL0Lpfu5SkSDNfK5wpqtMeGd3y90KD\",0,0)',	0,	'2024-11-21 11:25:24'),
(29,	'm15',	'Miguel',	'm',	'sitepal-avatar-male-15.jpg',	'AC_VHost_Embed(8738872,250,300,\"\",1,1,2770735,0,1,0,\"FdPdM3LSclmQzOB59xSsvwwHfneM1S8X\",0,0)',	0,	'2024-11-21 11:35:54'),
(30,	'm16',	'Francisco',	'm',	'sitepal-avatar-male-16.jpg',	'AC_VHost_Embed(8738872,250,300,\"\",1,1,2770727,0,1,0,\"JiQ2n6n81rLpJjxkohBTtCgWnvCQu8gz\",0,0)',	0,	'2024-11-21 11:35:54'),
(31,	'm17',	'Luis',	'm',	'sitepal-avatar-male-17.jpg',	'AC_VHost_Embed(8738872,250,300,\"\",1,1,2770728,0,1,0,\"VpGd741qh7mB5wOWJkxysT2Zh2EZ4w5w\",0,0)',	0,	'2024-11-21 11:35:54'),
(32,	'm18',	'Carlos',	'm',	'sitepal-avatar-male-18.jpg',	'AC_VHost_Embed(8738872,250,300,\"\",1,1,2770729,0,1,0,\"TrTVoRV4AqqOdFVjpeFpREhNKebtMQVR\",0,0)',	0,	'2024-11-21 11:35:54'),
(33,	'm19',	'Jose',	'm',	'sitepal-avatar-male-19.jpg',	'AC_VHost_Embed(8738872,250,300,\"\",1,1,2770726,0,1,0,\"CCLYpenhCcjEMnUoONNZhzOXDZ7wFjMy\",0,0)',	0,	'2024-11-21 11:35:54'),
(39,	'm20',	'Harry',	'm',	'sitepal-avatar-male-20.jpg',	'AC_VHost_Embed(8738872,250,300,\"\",1,1,2771304,0,1,0,\"AEYI7FiAPcXPwtk3sfUMHQguXvhdNe8y\",0,0)',	0,	'2025-01-09 07:10:51'),
(40,	'f16',	'Lisa',	'f',	'sitepal-avatar-female-16.jpg',	'AC_VHost_Embed(8738872,250,300,\"\",1,1,2771305,0,1,0,\"YXpSQPFndvYWqbbNaIZRceyi7OHmGddF\",0,0)',	0,	'2025-01-09 07:12:14');

CREATE TABLE `closingprompts` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `usecase_id` int unsigned NOT NULL,
  `ai_model_id` int unsigned DEFAULT NULL,
  `title` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `prompt_type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `prompt_text` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `prompt_text2` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `prompt_text3` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `template` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `lang` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'en-US',
  `date_created` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `prompt_type` (`prompt_type`),
  KEY `usecase_id` (`usecase_id`),
  KEY `lang` (`lang`),
  KEY `ai_model_id` (`ai_model_id`),
  CONSTRAINT `closingprompts_ibfk_1` FOREIGN KEY (`ai_model_id`) REFERENCES `ai_models` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

INSERT INTO `closingprompts` (`id`, `usecase_id`, `ai_model_id`, `title`, `prompt_type`, `prompt_text`, `prompt_text2`, `prompt_text3`, `template`, `lang`, `date_created`) VALUES
(1,	2,	NULL,	'Closing Analysis',	'closing-analysis-en-us',	'You are an AI-powered virtual coach designed to evaluate user responses in an ADAS training session. The user has completed a 20-question assessment on Advanced Driver Assistance Systems (ADAS).  \r\n\r\nHere is the transcription: [transcription]\r\n\r\nUsing the transcription generate a session evaluation report summarizing the user\'s performance, including:  \r\n- Overall assessment of their understanding.  \r\n- Strengths and areas for improvement based on their responses.  \r\n- Key learnings from the session.  \r\n- Recommendations for further study or practice.  \r\n\r\nEnsure the report is structured and easy to understand, providing actionable feedback for the user to improve their knowledge. Keep the tone professional yet encouraging.\r\n\r\n    VERY IMPORTANT you just speak [robinLang]. So give your response in that language. \r\n    VERY IMPORTANT [total_pts] must be greater or equal than 10, while considering the overall score.\r\n\r\n   Your response must be in the following JSON structure, make sure to use commas to separate the JSON elements:\r\n     {\r\n                \"overall_assessment\": \"An assessment in not more than a 100 words\",\r\n                \"strengths\": \"which parts of ADAS showed good knowledge\",\r\n                \"weaknesses\": \"which parts of ADAS showed poor knowledge\",\r\n                \"recommendations\": \"what is the recommendation to learn better\"\r\n      }',	'transcription = \"[transcription]\"',	'**MUST ALWAYS return something different than \"\" inside each element of the JSON.**\r\n**MUST ALWAYS response everything in [robinLang].**',	'<b>Overall Assessment</b>:  [overall_assessment]\r\n<br>\r\n<b>Strengths</b>: [strengths]\r\n<br>\r\n<b>Weaknesses: </b>: [weaknesses]\r\n<br>\r\n<b>Recommendations</b>:  [recommendations]\r\n<br>\r\n \r\n<br>',	'en-US',	'2025-04-24 08:24:00');

CREATE TABLE `coach_usecase_user` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `customer_id` int unsigned NOT NULL,
  `usecase_id` int unsigned NOT NULL,
  `user_id` int unsigned NOT NULL,
  `curr_stage` int NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`),
  KEY `usecase_id` (`usecase_id`),
  KEY `user_id` (`user_id`),
  KEY `customer_id` (`customer_id`),
  CONSTRAINT `coach_usecase_user_ibfk_1` FOREIGN KEY (`usecase_id`) REFERENCES `coach_usecases` (`id`) ON DELETE CASCADE,
  CONSTRAINT `coach_usecase_user_ibfk_2` FOREIGN KEY (`customer_id`) REFERENCES `admin_user` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

INSERT INTO `coach_usecase_user` (`id`, `customer_id`, `usecase_id`, `user_id`, `curr_stage`) VALUES
(3,	4,	101,	4,	8),
(4,	4,	101,	3,	4),
(5,	4,	101,	2,	1),
(6,	4,	102,	3,	7);

CREATE TABLE `coach_usecases` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `base_usecase_id` int unsigned NOT NULL,
  `customer_id` int unsigned NOT NULL,
  `usecase_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `added_instructions` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `added_content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `base_direct_access` tinyint unsigned NOT NULL DEFAULT '1',
  `direct_avatar` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '',
  `direct_avatar_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '',
  `direct_avatar_accent` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '',
  `direct_interaction_type` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '1=Realtime, 2=Video, 3=Audio',
  `direct_user_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '',
  `date_created` datetime NOT NULL,
  `intro_video` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `intro_desc` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `customer_id` (`customer_id`),
  KEY `base_usecase_id` (`base_usecase_id`),
  CONSTRAINT `coach_usecases_ibfk_1` FOREIGN KEY (`base_usecase_id`) REFERENCES `usecases` (`id`) ON DELETE CASCADE,
  CONSTRAINT `coach_usecases_ibfk_2` FOREIGN KEY (`customer_id`) REFERENCES `admin_user` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

INSERT INTO `coach_usecases` (`id`, `base_usecase_id`, `customer_id`, `usecase_name`, `added_instructions`, `added_content`, `base_direct_access`, `direct_avatar`, `direct_avatar_name`, `direct_avatar_accent`, `direct_interaction_type`, `direct_user_name`, `date_created`, `intro_video`, `intro_desc`) VALUES
(101,	2,	4,	'second x',	'',	'asd sadas xxxx',	0,	'12',	'Walter',	'7,10,4',	1,	'',	'2025-05-18 13:17:01',	'http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerFun.mp4',	'asd sad sadasd asd as ddddddd'),
(102,	2,	4,	'asdasdad',	'',	'asdsadas',	0,	'12',	'Walter',	'7,10,4',	1,	'',	'2025-05-22 05:24:17',	'',	'');

CREATE TABLE `dyn_fields` (
  `ID` int NOT NULL AUTO_INCREMENT,
  `source_fld_id` int DEFAULT NULL,
  `target_fld_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `trigger_name` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `trigger_elem` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `action` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `target_value` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `target_field_type` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `usecase_id` int NOT NULL,
  `exit_target_fld_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `exit_action` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `exit_target_value` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `exit_target_field_type` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  PRIMARY KEY (`ID`),
  KEY `source_fld_id` (`source_fld_id`),
  KEY `target_fld_name` (`target_fld_name`),
  KEY `exit_target_fld_name` (`exit_target_fld_name`),
  KEY `usecase_id` (`usecase_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;


CREATE TABLE `forms` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `usecase_id` int NOT NULL,
  `prompt_placeholder` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `field_type` tinyint NOT NULL COMMENT '1=text,2=textarea,3=select,4=upload',
  `label` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `field_values` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `field_order` tinyint NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`),
  KEY `usecase_id` (`usecase_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;


CREATE TABLE `messages` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `sender_id` int unsigned NOT NULL,
  `receiver_id` int unsigned NOT NULL,
  `for_admin` tinyint(1) NOT NULL DEFAULT '1' COMMENT '1=coach admin, 0=user',
  `content` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `usecase_id` int unsigned NOT NULL DEFAULT '0',
  `date_created` datetime NOT NULL,
  `is_read` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

INSERT INTO `messages` (`id`, `sender_id`, `receiver_id`, `for_admin`, `content`, `usecase_id`, `date_created`, `is_read`) VALUES
(5,	4,	2,	1,	'my first message is here',	0,	'2025-05-02 04:47:13',	0),
(6,	2,	4,	1,	'this is from two@two.com\r\nhow are you doing',	0,	'2025-05-02 10:18:59',	1),
(7,	4,	2,	1,	'all good here , how are you',	0,	'2025-05-02 04:49:41',	0),
(8,	3,	4,	1,	'This is my first message',	0,	'2025-05-29 10:45:00',	1),
(9,	4,	3,	0,	'This is my first reply',	0,	'2025-05-29 10:46:17',	1);

CREATE TABLE `prompts` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `usecase_id` int unsigned NOT NULL,
  `ai_model_id` int unsigned DEFAULT NULL,
  `title` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `prompt_text` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `prompt_placeholders` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `prompt_text2` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `prompt_text3` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `sequence` int unsigned NOT NULL DEFAULT '1',
  `lang` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'en-US',
  `ai_instructions_1` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `ai_instructions_2` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `date_created` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `usecase_id` (`usecase_id`),
  KEY `lang` (`lang`),
  KEY `ai_model_id` (`ai_model_id`),
  CONSTRAINT `prompts_ibfk_1` FOREIGN KEY (`ai_model_id`) REFERENCES `ai_models` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

INSERT INTO `prompts` (`id`, `usecase_id`, `ai_model_id`, `title`, `prompt_text`, `prompt_placeholders`, `prompt_text2`, `prompt_text3`, `sequence`, `lang`, `ai_instructions_1`, `ai_instructions_2`, `date_created`) VALUES
(1,	2,	NULL,	'Instruction Prompt',	'You are an expert in the topic of ADAS - Advanced Driver Assistance System, for which a document has already been provided.\r\nYou are going to have a small conversation with [userName] who is supposed to answer questions about ADAS. You have to ask [userName] questions to test his knowledge and help him if he is unable to give proper answers. \r\n\r\n VERY IMPORTANT: You are not an assistant; you are a subject matter expert on ADAS.\r\nVERY IMPORTANT: You speak exclusively in [robinLang].\r\nVERY IMPORTANT Only ask questions from the list below.\r\nVERY IMPORTANT In each interaction only ask one question.\r\n  VERY IMPORTANT in interaction [interNum] you will end the conversation by saying goodbye.\r\n     VERY IMPORTANT use well the [interNum] interactions to finish properly with conversation. \r\nVERY IMPORTANT: You control the conversation by asking questions related only to ADAS.\r\nVERY IMPORTANT: Do not answer any questions that are not about ADAS.\r\nIMPORTANT: Your name is [robinName].\r\nIMPORTANT: Always address the user by their first name ([userName]).\r\nIMPORTANT: Act as if you are in a [mood] mood.\r\nIMPORTANT: Keep your responses and questions short and concise.\r\nIMPORTANT: do the questions in a random way, do not start with the first question.\r\n[coachContent]\r\n2. Interacciones:\r\n   - El número total de interacciones es [interNum].\r\n\r\n3. Interacciones:\r\n   - El número total de interacciones es [interNum].\r\n   - La interacción 1 es de bienvenida. Debes presentarte y decirle que tu eres su coach de ADAS y que vas a darle \r\n-De la interaccion 2 a la 4, preguntale  de manera aleatoria alguna de los siguientes preguntas y dale retroalimentacion:\r\n\r\n\r\n\r\n-From interaction 5 to 6, ask [userName] if they have any questions regarding your previous discussion.\r\n\r\n-In interaction [interNum], DO NOT offer additional assistance beyond the asked question. Conclude the interview with final \r\n feedback, suggestions.\r\n\r\n**Restrictions:\r\nEach interaction must be a maximum of 60 words.\r\nDo not use more than 2 interactions on the same topic.\r\n\r\nADDITIONAL DETAILS:\r\nAlways use the name [userName] and address them informally (\"you\").\r\nOnly use the question guide and the ADAS manual; avoid other information.\r\nDo not discuss other topics.\r\nMaintain a neutral tone.\r\nBe concise and direct in your responses.\r\nDo NOT ask [userName] if they want to continue with the exercises; assume they want to proceed.',	'userName, mood',	NULL,	NULL,	1,	'en-US',	'',	'',	'2025-04-24 08:22:32');


CREATE TABLE `retroprompts` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `usecase_id` int unsigned NOT NULL,
  `ai_model_id` int unsigned DEFAULT NULL,
  `title` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `prompt_type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `prompt_text` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `prompt_text2` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `prompt_text3` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `template` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `lang` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'en-US',
  `date_created` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `prompt_type` (`prompt_type`),
  KEY `usecase_id` (`usecase_id`),
  KEY `lang` (`lang`),
  KEY `ai_model_id` (`ai_model_id`),
  CONSTRAINT `retroprompts_ibfk_1` FOREIGN KEY (`ai_model_id`) REFERENCES `ai_models` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

INSERT INTO `retroprompts` (`id`, `usecase_id`, `ai_model_id`, `title`, `prompt_type`, `prompt_text`, `prompt_text2`, `prompt_text3`, `template`, `lang`, `date_created`) VALUES
(1,	2,	NULL,	'Accuracy',	'accuracy-en-us',	'You are an expert in automotive systems. You are asking [userName] some questions to test their knowledge about the topic.\r\n\r\nCheck if the [userName] answer [user_answer] is accurate and relevant to question: [ai_question]. \"yes\" when is relevant and \"no\" when is not relevant. \r\n\r\n    VERY IMPORTANT you just speak [robinLang]. So give you response in that language. \r\n    VERY IMPORTANT the [userName] previous answer [user_answer]  must be the main aspect to consider.\r\n\r\n   Your response must be in the following JSON structure, make sure to use commas to separate the JSON elements:\r\n     {\r\n                 \"relevant\": \"yes | no, according with the relevance of the answer.\",\r\n                \"verdict\": \"brief explanation of the reasons for considering the answer as relevant or not\",\r\n                \"puntaje\": \"from 0 to 5 points according with the relevance. Always an interger number.\" }',	'userName = \"[userName]\"\r\nrobinLang = \"[robinLang]\"\r\nrobinName = \"[robinName]\"\r\nai_question = \"[ai_question]\"\r\nuser_answer = \"[user_answer]\"',	'**MUST ALWAYS return something different than \"\" inside each element of the JSON.**\r\n**MUST ALWAYS response everything in [robinLang].**\r\n**IMPORTANT limit your response at 40 words maximum.**',	'<br>\r\n<b>Was the answer relevant?</b>: [relevant]\r\n<br>\r\n<b>Why?</b>: [verdict]\r\n<br>\r\n<b>Score:</b>: [puntaje] pts / 5 pts',	'en-US',	'2025-04-26 05:18:18');

CREATE TABLE `saved_reports` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `uid` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `usecase_id` int unsigned DEFAULT NULL,
  `coach_user_id` int unsigned DEFAULT NULL,
  `interaction_type` tinyint(1) NOT NULL,
  `sitepal_image` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `elevator_pitch` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `closingretro` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `usecase_stage_id` int unsigned DEFAULT NULL,
  `date_created` datetime NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `uid` (`uid`),
  KEY `usecase_id` (`usecase_id`),
  KEY `coach_user_id` (`coach_user_id`),
  KEY `usecase_stage_id` (`usecase_stage_id`),
  CONSTRAINT `saved_reports_ibfk_1` FOREIGN KEY (`usecase_id`) REFERENCES `coach_usecases` (`id`) ON DELETE SET NULL,
  CONSTRAINT `saved_reports_ibfk_2` FOREIGN KEY (`coach_user_id`) REFERENCES `coach_users` (`id`) ON DELETE SET NULL,
  CONSTRAINT `saved_reports_ibfk_3` FOREIGN KEY (`usecase_stage_id`) REFERENCES `usecase_stages` (`ID`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

INSERT INTO `saved_reports` (`id`, `uid`, `usecase_id`, `coach_user_id`, `interaction_type`, `sitepal_image`, `elevator_pitch`, `closingretro`, `usecase_stage_id`, `date_created`) VALUES
(1,	'Vigv0sa7hXM5GzuKRCwSoxmT3DAWUp8dPjB6Q1Ey',	NULL,	3,	1,	'sitepal-avatar-male-10.jpg',	NULL,	'For showing the final verdict you must complete the full exercise!',	NULL,	'2025-04-24 09:50:29'),
(2,	'vNsl17Tx5Qic2SyDYwn6dUAOGtZK0muPBWbJo48r',	NULL,	3,	1,	'sitepal-avatar-male-10.jpg',	NULL,	'<b>Overall Assessment</b>:  Three\'s understanding of ADAS appears limited based on the responses given during the session. There was confusion about the functionalities of specific systems like Adaptive Cruise Control and a lack of knowledge regarding ADAS diagnostics and repair procedures.\r\n<br>\r\n<b>Strengths</b>: Three participated actively in the session, showing a willingness to learn and engage with the material, even though the responses were not accurate.\r\n<br>\r\n<b>Weaknesses: </b>: Three showed a lack of understanding in key ADAS functionalities such as how Adaptive Cruise Control differs from traditional cruise control, common diagnostic mistakes, and essential checks during ADAS repairs.\r\n<br>\r\n<b>Recommendations</b>:  It is recommended that Three reviews basic ADAS concepts, particularly focusing on the functionalities and purposes of systems like ACC. Studying OEM repair manuals and familiarizing with common diagnostic procedures will also be beneficial. Engaging in practical exercises or simulations could enhance understanding and retention of ADAS operations and repair techniques.\r\n<br>\r\n \r\n<br><br><br>',	NULL,	'2025-04-24 10:13:56'),
(3,	'TRXj38KQfnBs5G6DVFgeq4ZHWizILlm2ECUadA0p',	NULL,	3,	1,	'sitepal-avatar-male-10.jpg',	NULL,	'<b>Overall Assessment</b>:  Three demonstrated a basic understanding of ADAS components, particularly the role of sensors. However, there is room for improvement in articulating comprehensive challenges in ADAS integration and the broader implications on vehicle insurance.\r\n<br>\r\n<b>Strengths</b>: Three showed good knowledge of the importance of sensors in ADAS systems and recognized the impact of ADAS on reducing insurance premiums.\r\n<br>\r\n<b>Weaknesses: </b>: The responses lacked depth in discussing the integration challenges and did not mention other critical components like software algorithms, which are essential for ADAS functionality.\r\n<br>\r\n<b>Recommendations</b>:  It is recommended that Three reviews materials on ADAS software algorithms and explores case studies on ADAS integration challenges to gain a more holistic understanding. Engaging in discussions or webinars about ADAS advancements could also be beneficial.\r\n<br>\r\n \r\n<br><br><br>',	NULL,	'2025-04-26 05:06:22'),
(4,	'HX8RMVLEzcuTrkiYGId42Zn1QNmCKhjDg5o79OPx',	NULL,	3,	1,	'sitepal-avatar-male-10.jpg',	NULL,	'<b>Overall Assessment</b>:  Three demonstrated a basic understanding of ADAS components and impacts, particularly noting the role of sensors and the effect on insurance premiums. However, there is room for improvement in depth and specificity of knowledge, especially in understanding the integration challenges and the broader system components.\r\n<br>\r\n<b>Strengths</b>: Three shows good awareness of the importance of sensors in ADAS and understands the general benefit of ADAS on reducing insurance premiums.\r\n<br>\r\n<b>Weaknesses: </b>: Three lacks a comprehensive understanding of the integration challenges beyond issue resolution and did not mention other critical components like software algorithms and their functions in ADAS.\r\n<br>\r\n<b>Recommendations</b>:  It is recommended that Three reviews materials focusing on the comprehensive architecture of ADAS, including software algorithms, and explores case studies on ADAS integration challenges to gain a more detailed understanding.\r\n<br>\r\n \r\n<br><br><br>',	NULL,	'2025-04-26 05:09:30'),
(5,	'eTUMuAQ0DW5vPmVK9GSrtgO2ndfI3YRZJBlELxyj',	NULL,	3,	1,	'sitepal-avatar-male-10.jpg',	NULL,	'<b>Overall Assessment</b>:  Three demonstrated a foundational understanding of ADAS, recognizing key functionalities but often lacked depth in technical explanations. Their responses indicated a basic grasp of how systems like adaptive cruise control and lane keeping assist operate, though details were sometimes inaccurate or incomplete.\r\n<br>\r\n<b>Strengths</b>: Three shows a good initial understanding of the purposes and basic functions of different ADAS technologies such as adaptive cruise control and parking assistance systems.\r\n<br>\r\n<b>Weaknesses: </b>: Three struggles with the detailed technical aspects and specific technologies involved in ADAS functionalities, such as the precise role of sensors and cameras in systems like lane keeping assist.\r\n<br>\r\n<b>Recommendations</b>:  It is recommended that Three engages in more detailed study materials focusing on the specific technologies and mechanisms behind each ADAS feature. Interactive tutorials or hands-on training could also help solidify understanding of how these systems operate in real-world scenarios.\r\n<br>\r\n \r\n<br><br><br>',	NULL,	'2025-04-26 05:23:31'),
(6,	'sckB3t6Y2Guv1PgrZxQUJIO4bmoiwWEN85MHFjCX',	NULL,	3,	1,	'sitepal-avatar-male-10.jpg',	NULL,	'<b>Overall Assessment</b>:  The user has a basic understanding of ADAS concepts but lacks detailed knowledge of specific components and functionalities. They showed some awareness of adaptive cruise control but struggled with sensor types and calibration differences.\r\n<br>\r\n<b>Strengths</b>: The user demonstrated a basic understanding of how adaptive cruise control adjusts to traffic conditions.\r\n<br>\r\n<b>Weaknesses: </b>: The user was unable to identify the types of sensors used in ADAS and did not know the difference between static and dynamic calibration.\r\n<br>\r\n<b>Recommendations</b>:  To improve, the user should study the different types of sensors used in ADAS and understand the calibration processes. Reviewing materials on how ADAS components interact with each other would be beneficial.\r\n<br>\r\n \r\n<br><br><br>',	NULL,	'2025-04-29 06:19:17');

CREATE TABLE `saved_reports_options` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `saved_report_id` int unsigned NOT NULL,
  `seq` int unsigned NOT NULL,
  `gen_ques` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `ai_ques` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `user_resp` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `user_respV` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `retro` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  PRIMARY KEY (`id`),
  KEY `saved_report_id` (`saved_report_id`),
  CONSTRAINT `saved_reports_options_ibfk_1` FOREIGN KEY (`saved_report_id`) REFERENCES `saved_reports` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

INSERT INTO `saved_reports_options` (`id`, `saved_report_id`, `seq`, `gen_ques`, `ai_ques`, `user_resp`, `user_respV`, `retro`) VALUES
(1,	1,	1,	'Hi three, I\'m Zhao, your coach on ADAS - Advanced Driver Assistance Systems. I\'ll help you understand its crucial components and functioning. Let\'s dive right in. How does Adaptive Cruise Control (ACC) work, and how is it different from traditional cruise control?',	'/coach-app/mp3/680a073ab4fa5.mp3',	'Adidas is used for advanced driver system system in driving without gift modified',	NULL,	NULL),
(2,	1,	2,	'It looks like there was another misunderstanding. To answer the question on sensors: ADAS relies on various sensors, including cameras for lane detection and sign recognition, radar sensors for adaptive cruise control and collision detection, ultrasonic sensors for parking assist, and infrared sensors for night vision systems. These sensors help the vehicle perceive its surroundings. Now, another question: What does ADAS stand for, and what is its primary purpose in modern vehicles?',	'/coach-app/mp3/680a08dee3ca6.mp3',	'Adas is used for driving assistant system to help drivers drive the car safely',	NULL,	NULL),
(3,	1,	3,	'You\'re on the right track mentioning safety, three. To clarify, ADAS stands for Advanced Driver Assistance Systems. Its primary purpose is to enhance vehicle safety and driving efficiency by assisting the driver through features like collision avoidance, lane-keeping assistance, and adaptive cruise control. Now, do you have any questions about the topics we\'ve discussed so far?',	'/coach-app/mp3/680a091fc98c1.mp3',	'No looks good to me',	NULL,	NULL),
(4,	1,	4,	'Great! Let\'s make sure everything is clear. Do you have any other questions regarding ADAS or anything else we\'ve talked about?',	'/coach-app/mp3/680a095097b4b.mp3',	NULL,	NULL,	NULL),
(5,	2,	1,	'Hello three, I\'m Zhao, your ADAS coach. Let\'s dive into the world of Advanced Driver Assistance Systems. My first question for you is: How does Adaptive Cruise Control (ACC) work, and how is it different from traditional cruise control?',	'/coach-app/mp3/680a0e28baa70.mp3',	'Controls help the driver to remain in their lane while driving',	NULL,	NULL),
(6,	2,	2,	'Not quite right, three. Adaptive Cruise Control (ACC) maintains a safe following distance by adjusting the vehicle\'s speed based on traffic conditions. Unlike traditional cruise control, which maintains a set speed, ACC can automatically slow down or speed up depending on the distance to the vehicle ahead, ensuring safer driving. Let\'s move to the next question: What are some common mistakes in ADAS diagnostics?',	'/coach-app/mp3/680a0e589ab51.mp3',	'I am not quite sure what are the common mistake in a ADAS diagnostic',	NULL,	NULL),
(7,	2,	3,	'No worries, three. Common mistakes in ADAS diagnostics include clearing diagnostic trouble codes (DTCs) without addressing the root issue, skipping post-repair scans, using non-OEM scan tools that might not fully cover ADAS functionality, and failing to identify pre-existing faults that can affect the system. These oversights can lead to incorrect or incomplete repairs. Now, for our final wrap-up: What must an operator verify when repairing an ADAS-equipped vehicle? Goodbye!',	'/coach-app/mp3/680a0e8b9f75f.mp3',	'I am not say about this to thank you though',	NULL,	NULL),
(8,	2,	4,	'You\'re welcome, three. To answer your question: When repairing an ADAS-equipped vehicle, an operator must use OEM repair manuals, check for active DTCs, verify sensor and camera positions accurately, and assess the radar\'s signal clarity and field of view. Hope that helps! Take care, goodbye!',	'/coach-app/mp3/680a0ec22bd1d.mp3',	'Thank you and goodbye',	NULL,	NULL),
(9,	3,	1,	'Hello three, I\'m Zhao, your coach on everything related to ADAS. Let’s jump right into it. What are the critical components of an ADAS system that ensure its proper functioning?',	'/coach-app/mp3/680c695381931.mp3',	'The most important component are the sensors which help in detecting any danger or liability',	NULL,	NULL),
(10,	3,	2,	'That\'s correct, three. Sensors are indeed crucial as they gather real-time data to help the system make informed decisions. However, it\'s also important to mention the software algorithms that process this data to execute appropriate actions. Moving on, can you tell me about the typical challenges faced when integrating ADAS in vehicles?',	'/coach-app/mp3/680c696fe86f8.mp3',	'Yes I think the biggest problem is closing issue list without fully having fixed all of them',	NULL,	NULL),
(11,	3,	3,	'You\'re right to point out that inadequately addressed issues can be a significant challenge in ADAS integration. It\'s essential for safety and functionality that all problems are completely resolved before deployment. Lastly, three, how does ADAS impact vehicle insurance premiums? Goodbye.',	'/coach-app/mp3/680c6995a0688.mp3',	'Yeah having reduces the insurance premium',	NULL,	NULL),
(12,	3,	4,	'That’s correct, ADAS can lower insurance premiums as it tends to reduce the risk of accidents. Thanks for the discussion, three. Goodbye!',	'/coach-app/mp3/680c69b5acaa3.mp3',	'Okay okay good',	NULL,	NULL),
(13,	4,	1,	'Hello three, I\'m Zhao, your coach on everything related to ADAS. Let’s jump right into it. What are the critical components of an ADAS system that ensure its proper functioning?',	'/coach-app/mp3/680c695381931.mp3',	'The most important component are the sensors which help in detecting any danger or liability',	NULL,	NULL),
(14,	4,	2,	'That\'s correct, three. Sensors are indeed crucial as they gather real-time data to help the system make informed decisions. However, it\'s also important to mention the software algorithms that process this data to execute appropriate actions. Moving on, can you tell me about the typical challenges faced when integrating ADAS in vehicles?',	'/coach-app/mp3/680c696fe86f8.mp3',	'Yes I think the biggest problem is closing issue list without fully having fixed all of them',	NULL,	NULL),
(15,	4,	3,	'You\'re right to point out that inadequately addressed issues can be a significant challenge in ADAS integration. It\'s essential for safety and functionality that all problems are completely resolved before deployment. Lastly, three, how does ADAS impact vehicle insurance premiums? Goodbye.',	'/coach-app/mp3/680c6995a0688.mp3',	'Yeah having reduces the insurance premium',	NULL,	NULL),
(16,	4,	4,	'That’s correct, ADAS can lower insurance premiums as it tends to reduce the risk of accidents. Thanks for the discussion, three. Goodbye!',	'/coach-app/mp3/680c69b5acaa3.mp3',	'Okay okay good',	NULL,	NULL),
(17,	5,	1,	'Hello three, I\'m Zhao, your ADAS coach. Let\'s dive into some questions to test and expand your knowledge on Advanced Driver Assistance Systems. Here\'s the first one: Can you explain how adaptive cruise control differs from traditional cruise control systems?',	'/coach-app/mp3/680c6d33a94ce.mp3',	'Hello yes adaptive cruise control takes into account the environment and Road conditions which is superior than the tradition cruise control systems',	NULL,	'<br>\r\n<b>Was the answer relevant?</b>: yes\r\n<br>\r\n<b>Why?</b>: The answer correctly highlights that adaptive cruise control adjusts to the environment and road conditions, unlike traditional cruise control, making it a relevant response.\r\n<br>\r\n<b>Score:</b>: 5 pts / 5 pts<br><br>'),
(18,	5,	2,	'That\'s a good start, but let\'s add more detail. Adaptive Cruise Control (ACC) not only considers the road conditions but primarily adjusts the vehicle speed to maintain a safe distance from the vehicle ahead. Traditional cruise control maintains a set speed regardless of traffic conditions. Now, can you tell me about the technologies involved in lane keeping assist systems?',	'/coach-app/mp3/680c6d5c289ea.mp3',	'Yes we basically use sensors and readers to make sure that links are being navigator properly',	NULL,	'<br>\r\n<b>Was the answer relevant?</b>: no\r\n<br>\r\n<b>Why?</b>: The answer does not address the technologies specific to lane keeping assist systems, instead it vaguely mentions sensors without context.\r\n<br>\r\n<b>Score:</b>: 1 pts / 5 pts<br><br>'),
(19,	5,	3,	'Almost there, three. Lane Keeping Assist (LKA) systems primarily use cameras to monitor lane markings on the road. These systems then employ algorithms to determine if the vehicle is drifting out of its lane. If so, LKA provides steering corrections to keep the vehicle centered in its lane. For the final question: How do parking assistance systems enhance driver safety and convenience? Goodbye.',	'/coach-app/mp3/680c6d851b345.mp3',	'Yashoda lanekeeping assessments get real time feedback and allows the driver to avoid making mistakes while parking vehicle',	NULL,	'<br>\r\n<b>Was the answer relevant?</b>: no\r\n<br>\r\n<b>Why?</b>: The answer discusses lane keeping but does not address how parking assistance systems enhance safety and convenience, which was the question.\r\n<br>\r\n<b>Score:</b>: 1 pts / 5 pts<br><br>'),
(20,	5,	4,	'You’re on the right track mentioning real-time feedback, three. Parking assistance systems typically use a combination of cameras and sensors to provide visual, auditory, or tactile feedback to the driver, making parking easier and reducing the risk of collision. This enhances both safety and convenience. Keep studying these systems, and take care, goodbye!',	'/coach-app/mp3/680c6db3bfa77.mp3',	'Thank you for feedback bye',	NULL,	'<br>\r\n<b>Was the answer relevant?</b>: no\r\n<br>\r\n<b>Why?</b>: The response \'Thank you for feedback bye\' does not address the specifics of parking assistance systems or real-time feedback.\r\n<br>\r\n<b>Score:</b>: 0 pts / 5 pts<br><br>'),
(21,	6,	1,	'Hi three, I\'m Zhao, your ADAS coach. Let\'s dive into some questions to test your knowledge. Can you tell me what types of sensors are used in ADAS to detect the vehicle’s surroundings?',	'/mp3/68106f0122427.mp3',	'Hello yes sir Canvas',	NULL,	'<br>\r\n<b>Was the answer relevant?</b>: no\r\n<br>\r\n<b>Why?</b>: The answer \'Hello yes sir Canvas\' does not address the question about types of sensors used in ADAS. It is unrelated to the topic of automotive sensors.\r\n<br>\r\n<b>Score:</b>: 0 pts / 5 pts<br><br>'),
(22,	6,	2,	'Actually, the correct sensors used in ADAS are Cameras, Radar sensors, Ultrasonic sensors, and Infrared sensors. Now, can you explain the difference between static and dynamic ADAS calibration?',	'/mp3/68106f2a74805.mp3',	'I am sorry I do not know the answer to that',	NULL,	'<br>\r\n<b>Was the answer relevant?</b>: yes\r\n<br>\r\n<b>Why?</b>: The user\'s response indicates a lack of knowledge on the specific topic of ADAS calibration, which is directly related to the question asked.\r\n<br>\r\n<b>Score:</b>: 2 pts / 5 pts<br><br>'),
(23,	6,	3,	'No worries, three. Static Calibration happens in a controlled environment without moving the vehicle, while Dynamic Calibration is conducted on the road under specific driving conditions. Let\'s move on to the next question. How does Adaptive Cruise Control (ACC) differ from traditional cruise control?',	'/mp3/68106f3b418b9.mp3',	'School control is more intelligent because it takes into account for traffic conditions and the environment',	NULL,	'<br>\r\n<b>Was the answer relevant?</b>: no\r\n<br>\r\n<b>Why?</b>: The answer is not relevant as it does not address the differences between Adaptive Cruise Control and traditional cruise control.\r\n<br>\r\n<b>Score:</b>: 0 pts / 5 pts<br><br>'),
(24,	6,	4,	'You\'re on the right track. ACC maintains a safe following distance by adjusting speed based on traffic, unlike traditional cruise control, which maintains a set speed. Nice efforts, three! Goodbye and keep learning!',	'/mp3/68106f59aa9eb.mp3',	'Thank you for feedback',	NULL,	'<br>\r\n<b>Was the answer relevant?</b>: yes\r\n<br>\r\n<b>Why?</b>: The response \'Thank you for feedback\' is appropriate as it acknowledges the feedback given about ACC and traditional cruise control, even if it doesn\'t add further information.\r\n<br>\r\n<b>Score:</b>: 3 pts / 5 pts<br><br>');


CREATE TABLE `ugroups` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `customer_id` int unsigned NOT NULL DEFAULT '1',
  `group_name` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `logo` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `date_created` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `customer_id` (`customer_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

INSERT INTO `ugroups` (`id`, `customer_id`, `group_name`, `logo`, `date_created`) VALUES
(3,	1,	'Welcome Canadian Newcomers',	'candian-newcomers.jpg',	'2024-01-08 15:13:06'),
(4,	1,	'Investors',	NULL,	'2024-01-08 15:26:02'),
(5,	1,	'Clientes',	NULL,	'2024-01-20 21:20:39'),
(6,	1,	'Oxxo Rolplay',	NULL,	'2024-02-13 05:02:51'),
(7,	1,	'Monex',	NULL,	'2024-02-26 18:30:29'),
(8,	1,	'California Newcomers',	NULL,	'2024-04-11 14:00:52'),
(9,	1,	'Pharma Assistants',	NULL,	'2024-05-24 21:02:33');

CREATE TABLE `usecase_accents` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `usecase_id` int unsigned NOT NULL,
  `language_code` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `accent_code` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `accent_text` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `class_name` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  PRIMARY KEY (`id`),
  KEY `usecase_id` (`usecase_id`),
  CONSTRAINT `usecase_accents_ibfk_1` FOREIGN KEY (`usecase_id`) REFERENCES `usecases` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

INSERT INTO `usecase_accents` (`id`, `usecase_id`, `language_code`, `accent_code`, `accent_text`, `class_name`) VALUES
(44,	2,	'en-US',	'3,1,2',	'US Male',	'mvoice en');

CREATE TABLE `usecase_ai_models` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `usecase_id` int unsigned NOT NULL,
  `ai_model_id` int unsigned DEFAULT NULL,
  `display_order` tinyint unsigned NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`),
  KEY `usecase_id` (`usecase_id`),
  KEY `ai_model_id` (`ai_model_id`),
  CONSTRAINT `usecase_ai_models_ibfk_1` FOREIGN KEY (`usecase_id`) REFERENCES `usecases` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `usecase_ai_models_ibfk_2` FOREIGN KEY (`ai_model_id`) REFERENCES `ai_models` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;


CREATE TABLE `usecase_avatars` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `usecase_id` int unsigned NOT NULL,
  `avatar_id` int unsigned NOT NULL,
  `is_default` tinyint(1) NOT NULL DEFAULT '0' COMMENT '1=true, 0=false',
  PRIMARY KEY (`id`),
  KEY `usecase_id` (`usecase_id`),
  KEY `avatar_id` (`avatar_id`),
  CONSTRAINT `usecase_avatars_ibfk_1` FOREIGN KEY (`usecase_id`) REFERENCES `usecases` (`id`) ON DELETE CASCADE,
  CONSTRAINT `usecase_avatars_ibfk_2` FOREIGN KEY (`avatar_id`) REFERENCES `avatars` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

INSERT INTO `usecase_avatars` (`id`, `usecase_id`, `avatar_id`, `is_default`) VALUES
(1,	2,	2,	0);

CREATE TABLE `usecase_customers` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `usecase_id` int unsigned NOT NULL COMMENT 'base use case',
  `customer_id` int unsigned NOT NULL COMMENT 'admin user',
  PRIMARY KEY (`id`),
  KEY `usecase_id` (`usecase_id`),
  CONSTRAINT `usecase_customers_ibfk_3` FOREIGN KEY (`usecase_id`) REFERENCES `usecases` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

INSERT INTO `usecase_customers` (`id`, `usecase_id`, `customer_id`) VALUES
(6,	2,	4);

CREATE TABLE `usecase_group` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `usecase_id` int unsigned NOT NULL,
  `group_id` int unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `usecase_id` (`usecase_id`),
  KEY `group_id` (`group_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

INSERT INTO `usecase_group` (`id`, `usecase_id`, `group_id`) VALUES
(1,	1,	9);

CREATE TABLE `usecase_instructions` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `usecase_id` int unsigned NOT NULL,
  `itreaction_no` tinyint unsigned NOT NULL,
  `lang` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `instruction` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  PRIMARY KEY (`id`),
  KEY `usecase_id` (`usecase_id`),
  KEY `lang` (`lang`),
  CONSTRAINT `usecase_instructions_ibfk_1` FOREIGN KEY (`usecase_id`) REFERENCES `usecases` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

INSERT INTO `usecase_instructions` (`id`, `usecase_id`, `itreaction_no`, `lang`, `instruction`) VALUES
(1,	2,	1,	'en-US',	'<p>asdsad</p>'),
(2,	2,	2,	'en-US',	'<p>asdsad</p>'),
(3,	2,	3,	'en-US',	'<p>sadsad</p>'),
(4,	2,	4,	'en-US',	'<p>asdsad</p>'),
(5,	2,	5,	'en-US',	'<p>asdsa</p>'),
(6,	2,	6,	'en-US',	'<p>sadsa</p>'),
(7,	2,	7,	'en-US',	'<p>asdsa</p>'),
(8,	2,	8,	'en-US',	'<p>asd</p>');

CREATE TABLE `usecase_stages` (
  `ID` int unsigned NOT NULL AUTO_INCREMENT,
  `coach_usecase_id` int unsigned NOT NULL,
  `sequence` smallint DEFAULT '1',
  `name` varchar(50) NOT NULL,
  `one_liner` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`ID`),
  KEY `coach_usecase_id_sequence` (`coach_usecase_id`,`sequence`),
  CONSTRAINT `usecase_stages_ibfk_1` FOREIGN KEY (`coach_usecase_id`) REFERENCES `coach_usecases` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

INSERT INTO `usecase_stages` (`ID`, `coach_usecase_id`, `sequence`, `name`, `one_liner`) VALUES
(4,	101,	1,	'Active Stage',	'default'),
(5,	101,	4,	'Completion Stage',	''),
(6,	101,	2,	'Perhaps this was a \'quotabl\'e quote',	'asdasdasdsad'),
(7,	102,	1,	'Active Stage',	''),
(8,	101,	3,	'new stage',	'this is teh desc');

CREATE TABLE `usecase_termins` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `usecase_id` int unsigned NOT NULL,
  `language_code` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `phrases` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  PRIMARY KEY (`id`),
  KEY `usecase_id` (`usecase_id`),
  CONSTRAINT `usecase_termins_ibfk_1` FOREIGN KEY (`usecase_id`) REFERENCES `usecases` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- 2025-05-29 11:00:42 UTC
