-- Host: db-master-9.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=33333;

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


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

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

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

INSERT INTO `users` VALUES (1,'service_account@corp.net','$2b$12$0XZnUz5vQ407caG0OajxGt1Ylb6K.bqmebW6Cu8IButRWPj959kJi','user','ak_ebb97f31c8128f0c','2023-07-27 10:02:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@corp.net','$2b$12$hHNgqvpcVYn9BtqDn0p2tBMR6/oIg5BX.jYxqohe.L7E9aygu5vML','user','ak_2795aaa98bb33a63','2023-01-04 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@corp.net','$2b$12$cNgWwaMrMB0//zbaHPgyvRgnkGr9dtbJKdGboAjBSzkH92gP.5Zc8','admin','ak_01e5b27634dbced8','2023-12-08 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'admin@company.com','$2b$12$aUcBl4vufyz3GDX8DgB41IP218B41pKbVgC6xPe8xOnR7frayAHrD','user','ak_8bc176d95a383f97','2023-05-14 10:13:00',NULL);

