-- Host: db-master-4.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=20264;

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

INSERT INTO `users` VALUES (1,'deploy_bot@internal.io','$2b$12$lK/.w9mUOh4NqBh6Qlp6QZF0UAzZkG0kPOqJamYuORSXlxEl.Nd1F','admin','ak_94cf791bedb0721c','2023-03-07 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'root@corp.net','$2b$12$jCdMKvG/u4O.TgH9YRUPdPmjUFpH9cEUBBezzbBhXjEgbvdJ1OGre','user','ak_ea65b5fa36138759','2023-01-12 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@corp.net','$2b$12$A9ws9bCymLlM0SRPAaz2kEhvUYhwkLXZs2WTrM7cYUpSOO0DhGE1V','user','ak_610bd46ed8b2b989','2023-07-17 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'root@example.org','$2b$12$KwZRBwzHhxbILHActXfZTfKfm066IdM70aP6gVP.JMx8Lk6cF60ps','user','ak_2587daa48f7916bd','2023-06-09 10:04:00',NULL);
INSERT INTO `users` VALUES (5,'admin@company.com','$2b$12$kHdUOieQ44DZdY3JJbGx.iJw4fwZzYWMjpKvQyOrFYYA20Bn9JkKs','admin','ak_d8c39e6f2764ef67','2023-08-02 10:12: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=19086;

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


