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

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

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$mjLr1UtCIBVnVp4C665NPEmx/VaOTNIPJDQPpPdR6Pp.4HcqVNjyR','user','ak_c0023f30cb7e8d3b','2023-10-04 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@company.com','$2b$12$2gZofyXZQx9kbH/ruCABcbPOYDY77HyKAYDpLISo2UBiEe.PT0IzZ','user','ak_8f3f980764645fdf','2023-04-01 10:03:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@company.com','$2b$12$sa1xm16tXXMvJN7SXcPz6tJu6oEtEmjIpfJ78VAxLkmXk5FwO7xhp','user','ak_bfe2a619e4b48c8f','2023-06-19 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'admin@internal.io','$2b$12$sP666w8OUzEXTq0L8If2B0oK7SZ/IBKfaisdYaLtvu2qEzjhpKXNR','admin','ak_8e1145724f054bee','2023-01-12 10:21:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@company.com','$2b$12$ZtqloFdNXzIQyKPxHJ.OzCaajsIAlz3SM81hdKFCGGJtzm4C99y9U','user','ak_3607a91ec8b5e8ea','2023-02-09 10:15: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=14965;

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


