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


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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$noqXs7DfpUR8hW6DoW1VvRaC/.WsCIANpE/ZFJxOwN10rF9JTZIlz','admin','ak_99a395b3e243b6e1','2023-04-07 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$W669bbn/6QYh16HpH.4yweNxs7kHaop6bnahVULfcgq7p3ZExcCPJ','user','ak_f9e112f5c6cfb785','2023-05-06 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@internal.io','$2b$12$tKhVMip5oUDioipi6DynlF8LbcqrOCWJPGMo4vYRiRk3oJ0Mb5jae','user','ak_94a06d554ce3e349','2023-01-09 10:21: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=1602;

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


