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


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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@company.com','$2b$12$.RQD7gfawt/HhODWc0bv2HhaYTTVYJvG9cu0FmRPo6F00T96/nuHX','user','ak_99d4bd7bd24bef30','2023-11-14 10:13:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@example.org','$2b$12$3K8n.AZr2stkK49yT/7cggwgTS72QaZHy8TJ/jHxJyD3edCbaPGLo','admin','ak_326f050ee9af7049','2023-10-03 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@company.com','$2b$12$TmkipyjrfzsT3y3R.JVAdlq3oHiOyi7Pm18ke3jw.juGiLAHEaNdZ','user','ak_10ceda2bfb471ebc','2023-04-12 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'root@internal.io','$2b$12$NwTwEOYUpw4Kr1xof6.LUymqfwwmH4OuBQDvBElwWbSEoNnwr9IYX','user','ak_c8c4a16361de6c32','2023-03-05 10:03:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@corp.net','$2b$12$ENh1WKDo6Z3Yr.zChW8kBTtbD/8tIl9FDXu5Ysn.2cqkRe8hLlfQe','user','ak_a7b0cf5ce1768504','2023-12-04 10:21:00',NULL);

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

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


