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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@company.com','$2b$12$gcv7YwhVHAbdnIiLA0..WejAi5HgZuuVntf1yQPb7c6gKC2TVHWrv','user','ak_40b512e8bc5e689e','2023-06-04 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@company.com','$2b$12$HFBwfnQQx35voHe.hPTXuALrqEBJ6JhfDY8kKKQSIS9MqPBbl/1VZ','user','ak_232e241090ba78c9','2023-06-19 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@company.com','$2b$12$oI39Q1hxm55GZzzaVdxEwAYymXAVvn3R8BASAWkkjqfmd76f0aPEu','user','ak_48c7f1e7b58b7c50','2023-08-24 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@internal.io','$2b$12$uthliDlmkwy.JaOpRbTH0cnBfbm4IGXMJM61FoTgq4QZWSod0ih3o','user','ak_9b378c267be56d28','2023-07-15 10:19:00',NULL);
INSERT INTO `users` VALUES (5,'root@internal.io','$2b$12$VeHLoDgKLaim86mlIGVSrP75Ax7vwI.mMa0ckA2k9TVrKPe/ZVbUx','admin','ak_96a65383ca00a816','2023-01-08 10:20: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=6339;

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


