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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@example.org','$2b$12$Wl45C1GJvju7fOrphg1/uH931LHvRd78W4PsWJ.SlGSV5RnLt4t7P','user','ak_5fab40f212ee403c','2023-07-08 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@corp.net','$2b$12$9jD8GM3F9Fxn5hjskr7G1wlhshxV2d/bu6fU098rALIKteZdKjtRl','user','ak_c6b802b7e7819e4f','2023-02-15 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@company.com','$2b$12$w5vn7nnmWk35cdrkKDLakpXZsWHoJPHrhBm9aL2YYcvSG6yMogBa4','admin','ak_8b3d1613173749d2','2023-06-12 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@example.org','$2b$12$EdycGcoh4tYpu5aHptHySIUvtrvkhtCh9fvCrrll6FzVnmUDv5/cO','admin','ak_1ad64d8b725d807a','2023-09-27 10:05:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@company.com','$2b$12$awuHzqeLJr1wh9Q1FurPij1vCqH4NBTkjNIzTqTUBpULtdepgWFJg','admin','ak_eaa9c60eeac3f16a','2023-11-03 10:13:00',NULL);
INSERT INTO `users` VALUES (6,'service_account@company.com','$2b$12$jYTyhMjLGdpO2VPhm1uwuy9p2Wh9.6HJvtqADiKZE1Ta2n.Tu3HKZ','user','ak_1fa7cab88272e165','2023-05-26 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=16759;

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


