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


--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `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=12157;

--
-- Dumping data for table `sessions`
--


--
-- 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=6769;

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

INSERT INTO `users` VALUES (1,'root@corp.net','$2b$12$MWHYWdGIbFsFh0WrHFQ5Xdoirsxxfjbz4HlWikSlnbF.uB./0gYoG','admin','ak_efed0d1b2d3c9f3b','2023-11-19 10:21:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$5WkBcFAumMGwCGo.mGSLQXDXLcxIGtzh3UH6Kq0y3CfOOYyE.uDY2','admin','ak_2c5eeb6697a948b2','2023-11-17 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@internal.io','$2b$12$xXJOWPSyRrJEEmcT2.K1JHC7GYntJDP.hjmz5lTSftPH9hG7eQK0e','admin','ak_e52a4113e7582392','2023-07-10 10:21:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@company.com','$2b$12$8FLtvwtXAn8x2Y6Mti4iPG3EFB6djQd1nUYKNs6qNA4a1xdtcKPD0','user','ak_36ca09a7b99bd3eb','2023-03-05 10:09:00',NULL);
INSERT INTO `users` VALUES (5,'root@corp.net','$2b$12$rVAmEKSrlioHkpsCYfo/8F/3cLKXhGvSgHz5GNMPuz0t1NPcyNCLE','user','ak_c56d1c4884b31e50','2023-09-28 10:10:00',NULL);

--
-- 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=40866;

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


