-- Host: db-master-2.internal    Database: analytics


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

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

INSERT INTO `users` VALUES (1,'root@internal.io','$2b$12$ILuKcvhXUtlIenBQYJcinqIYlv7grp7IAChhx6NHgc03XoeMhIjhg','user','ak_038b4f45eaafd6e2','2023-08-06 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'root@corp.net','$2b$12$Tmll7V62AXcfEyBMXlRqUT8TC2YKi64DtL3g0qIv.GWK1bYYoDGLy','user','ak_1646c45031ded758','2023-01-03 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@company.com','$2b$12$E27pSHcVxL3uRDJbLhk51rgxTyaxrF4MC901C26gntWi3izyRmP.X','user','ak_651f4031a859f786','2023-11-04 10:06:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@internal.io','$2b$12$IETTbpYSIPbDSgiGyM84lsSwck.f1T88V4y.Ek4LjlhVRhKrgvYJJ','admin','ak_8235c033b8928bfe','2023-05-01 10:07:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@example.org','$2b$12$K94xn4a542OVmPkVtk1a2jXRgjo22SzlcqqYna/4iCLWlSnd6PnDB','user','ak_f22020ee41ceb469','2023-10-17 10:10: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=12755;

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


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

--
-- Dumping data for table `orders`
--


