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

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$NUs.2gh0mArGN7mHJ6dEVkU13d1l0pZPJPvJ88hhrHBW4q/hxCiD3','user','ak_3d51cd860ee858a9','2023-04-14 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@internal.io','$2b$12$CvwzSCQjrtshMVJWHVbRRv59x0cP6Y2wPlw0.A4RYGweys/xFutOx','admin','ak_41072e4b6853e84b','2023-09-08 10:03:00',NULL);
INSERT INTO `users` VALUES (3,'root@company.com','$2b$12$Ue5NbuKAYiD7nkVZS8W/AdYgr3u6izcNlJpsyVcRjbCiLFcn30hw5','user','ak_51ac691ec714affe','2023-11-06 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@example.org','$2b$12$/vqx0xhN0/w96y57SdfTuRwuFDiaX7pIykMfpWRhtA4HpuOrR/Ejf','admin','ak_38d74a30fc401baa','2023-04-19 10:22:00',NULL);
INSERT INTO `users` VALUES (5,'admin@internal.io','$2b$12$NcW0pZXNRWBObS0i84z7NzWYgdTe2Pu7IDJJsU4xLb58fGTfREs3c','user','ak_e0c17f5ae75a3cd0','2023-06-07 10:04: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=43495;

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

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


