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


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

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


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

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

INSERT INTO `users` VALUES (1,'root@corp.net','$2b$12$J4E3yVxOxV2wv3cGH/01TdP6IVnKIt3OaozLUaKWJ4KpMYW3F.1YK','user','ak_341690be776a284d','2023-04-11 10:11:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@internal.io','$2b$12$neWiMlGKQz8ddiPaExscltpWvAKAl1M/Q/p/sGoCQrYXmbyrOa6Df','user','ak_fc389c11015a2f94','2023-01-17 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$LDGg5TDYrvjofiKaHXQmV2VZSHRkJaJ.m6Hh/TmLCQ2DcEgf/Axn1','admin','ak_2f8e22420cb0f553','2023-01-12 10:23:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@corp.net','$2b$12$EG2ovckcps7f..qfd6SDPFHwMnMwUmftPoPeJqWXokkq1KW0Pc5pl','user','ak_20614fdde7cbbcf1','2023-06-13 10:08:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@example.org','$2b$12$Fr7tjGV40D9407IlJGquutYNOkCUJnEFuUDb7dc4URIBuKpa15PU6','admin','ak_26335f5641e75bc4','2023-11-10 10:20:00',NULL);
INSERT INTO `users` VALUES (6,'admin@company.com','$2b$12$YGdm2.Fjm5wmz87lD7PpyVtgvY01ffjDpOUa1j7kGrrLJkW3k3ojY','user','ak_c97a2fb285907a6c','2023-04-24 10:16:00',NULL);
INSERT INTO `users` VALUES (7,'john.doe@company.com','$2b$12$2PhS.GpKEcASOkaUHu02rEdt1wn0ywCnUMY6OlMaRW.wYvgChUAN8','user','ak_3260303d0a2cb8fc','2023-04-11 10:13: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=42946;

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


