-- Host: db-master-4.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=21653;

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

INSERT INTO `users` VALUES (1,'jane.smith@corp.net','$2b$12$5tPCJLWLwyXB5jMzJZzm359F8f9fM2kzAbyzSoKh6HR9vQsV/Ioxw','user','ak_e86d90b06409929b','2023-11-21 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'root@example.org','$2b$12$5QCVfzlpLs7BBwDVI95XY2cma7fQJ3uwTdNbuXkFxWC36tk.5VLa0','admin','ak_46ed54c1044e5a07','2023-08-28 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@corp.net','$2b$12$o7WoU7y.4Qe.SsxL5ppWj68s56A0vTm.uMqVV22DvZB8oqs/gCGmD','user','ak_27a165b2f50ccc4a','2023-04-16 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@example.org','$2b$12$TgsJX/xNgXxM9ErcyFNfMQUHqOjIsD5C4pQP1DmTquFRXlhae.xDu','admin','ak_d7a68fe2a6c95c11','2023-11-20 10:10:00',NULL);

--
-- Table structure for table `orders`
--

CREATE TABLE `orders` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `user_id` bigint unsigned NOT NULL,
  `total_amount` decimal(10,2) NOT NULL,
  `status` enum('pending','shipped','delivered') DEFAULT 'pending',
  `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=20380;

--
-- Dumping data for table `orders`
--


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

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


