-- Host: db-master-8.internal    Database: analytics


--
-- Table structure for table `audit_log`
--

CREATE TABLE `audit_log` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `data` text,
  `created_at` timestamp DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=30773;

--
-- Dumping data for table `audit_log`
--


--
-- Table structure for table `users`
--

CREATE TABLE `users` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `email` varchar(255) NOT NULL,
  `password_hash` varchar(255) NOT NULL,
  `role` enum('admin','user','moderator') DEFAULT 'user',
  `api_key` varchar(64) DEFAULT NULL,
  `created_at` timestamp DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=16162;

--
-- Dumping data for table `users`
--

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$pvyfFV9L.pKVq12tf1jK9lUKpV9357DdayKZjjGfsx1fv2miJ9FB/','admin','ak_6d9c7e64adf8ce36','2023-11-14 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@internal.io','$2b$12$DhuHZeVTmqP96KQKnV1yM.JbToRTbT7vrGJuVz252Fi8KbuxCLdwC','user','ak_70e6ae0491f93844','2023-04-06 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@internal.io','$2b$12$e67WULUVgnwWD2oO1TrmGWLccPgnco27YTy.J7BN7LSvKvXaujKru','user','ak_b405da347f352b38','2023-03-24 10:04:00',NULL);
INSERT INTO `users` VALUES (4,'root@internal.io','$2b$12$fiEhDIyirDCs3160Afo/OFUsP5pkQU07JQu3.dbreLaJqXe2FGZHA','user','ak_cbd2650b515ddf14','2023-05-25 10:22:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@corp.net','$2b$12$iDCIcXXfbWdpZBifTOR5fO21HEKRm0llgRy3CgeWZlujkBUCVOMsw','user','ak_878eadd9bce960c6','2023-06-26 10:11:00',NULL);

--
-- Table structure for table `products`
--

CREATE TABLE `products` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `data` text,
  `created_at` timestamp DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=19560;

--
-- Dumping data for table `products`
--


