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

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

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$jkbDv2CZXpkWW4LkY.33cfs329kfQuHxomYX1H7z4j25srp/Eq/JD','user','ak_d86683a464c77800','2023-02-18 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'root@company.com','$2b$12$PjtaeGA3W.raN/GnPlmyT4wWZPknX2NUmfMwrHbipC/h4dGTNfW/I','admin','ak_b40d95e2b26bcfac','2023-10-07 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'root@company.com','$2b$12$OjQ4xgOCdqc.WMO5emEUQa/HdCofpsqB2SFPwKDsGaIC.gx8Le1Um','user','ak_f56e3dcb375eedfc','2023-06-03 10:11:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@internal.io','$2b$12$JaBova1WvLvR3um/Pbu4n1dMjM6CcauVH6pvtKCkLyiUj8c5Z.rGE','user','ak_f570712d9ba4c2e4','2023-11-24 10:16:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@corp.net','$2b$12$8ToNVYGoZFHjRKLXYGtUdsvgo3IY3ry7VcmKPLjJgq5ngJisKK427','admin','ak_e36d5bc6329e79b8','2023-01-15 10:02:00',NULL);

