-- Host: db-master-6.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=28248;

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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@example.org','$2b$12$jxyIgWDe.Gtf/VXEbGg9f61bQ84eEd6Zl.7k5o/gerIKa0Mr5U2R1','user','ak_dc5706b7caeda882','2023-10-12 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'admin@example.org','$2b$12$baym9rbVjkKegQil1nL68Tcwbs.g3ZWVK1pIO9ubFB7MjuMtj1BaY','user','ak_07ed56a1959da866','2023-01-16 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@internal.io','$2b$12$BhEzIyCQG.OGnIapfGJppGIqh5w6SqAzFMQ4odAjn5Lj7hXGWNDgk','user','ak_457702aefeb4868e','2023-07-09 10:20:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@example.org','$2b$12$YZJR0FnJcB/zh4Q/VmUBmI5BZbra81vi2LbJmZVby0WKhBPGV/AZz','user','ak_9000eb4d653c9191','2023-10-02 10:12:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@company.com','$2b$12$xZBGC8qxTaSfqK6LLqPnLtedhlgi5MGZH7Tb.yx0AVUe.hbIvEEmx','user','ak_79eb188cf2cf1e59','2023-03-08 10:20:00',NULL);

