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

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

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


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

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$7H1NA4HbrgsJdnABfXkKUHey1LoAeVeHufgKKXBeQ2PV9K7jzeFXk','user','ak_0b6c84cc194981ad','2023-04-05 10:21:00',NULL);
INSERT INTO `users` VALUES (2,'root@internal.io','$2b$12$Gbie/1t0tuZ1YCl4QbMO9NIkDdePdL9XSaQnLwV293xOhz/AZLmH1','admin','ak_04e1754b70c23ace','2023-11-02 10:03:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@example.org','$2b$12$JT.kHNYhKI/T9XCaMXXVwlweBOq8Z2d4LO2nXTIRravdk2q2mxFnH','user','ak_ee27b90d0177faed','2023-05-22 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@company.com','$2b$12$Of9oPJuEmZXXxlOR37snQVqEpyPKLaMW4CpjyO8Q8a4rAWQEM2d1P','user','ak_477d3701aec45c62','2023-05-08 10:06:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@company.com','$2b$12$4Jhfb6N9AQaJPSBusA5Wz9lExVDBWQ5/yOtsV66EpPzKI7yGGf.th','admin','ak_44d56d3d0f7b625c','2023-10-13 10:10:00',NULL);

