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

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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@example.org','$2b$12$wDbySR6aPIEng2loor9H0GpnMNAnO9vCbn0zhGw17Uk0LDkNpUKNO','user','ak_3fd7473af5121518','2023-09-05 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@corp.net','$2b$12$WKShir8Vnxb/Z/KLPzfkcFpINwVpqHRDoO/tgqCxs6rzO5FBKl.6i','user','ak_dab06176cdd5a135','2023-05-12 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@example.org','$2b$12$7ju/aWVYJbn7hp/grtQrC67o6DKDrvBUyXTHDhZEk2n9RigAqs8O.','user','ak_da08cc24806f9201','2023-09-24 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'admin@corp.net','$2b$12$uwNTH1BNrq3Vexu9cuXCPYaJatWn3t2/4Jx4pb804.8f.6dWtRd6N','user','ak_dc6b46085f328642','2023-01-04 10:11:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@example.org','$2b$12$HT11bFKpq6uAj039mtginM9BWCO/aD3LBcMsoLtIL9jAYrVF7Hyv5','admin','ak_bcdf9b01f27213c9','2023-07-14 10:21:00',NULL);

