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

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

INSERT INTO `users` VALUES (1,'deploy_bot@company.com','$2b$12$6.WfbOPQhJ9OuoBtlLDEtXE0qWJqNtnavllcXJrb..u9rR6TXPxtp','user','ak_ddbc7f8af4242c98','2023-10-25 10:13:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@example.org','$2b$12$bkgBfXiKuOInhQdTqhPuscjKI9w0nKoo0QWBn1J16vMXGbatzyt.O','admin','ak_2df63a37d568aceb','2023-08-14 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$umwkYiVdTNoaGsw/.yB6Q5d9ZBA/WYstNQqgxxLRb1BDAciMONqX6','user','ak_54649bd7aa1eb8e2','2023-06-28 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@company.com','$2b$12$Xv/Qi6JlcRj4vlG.2d61EdyZiCKogrQ0g6n5O.ivbk/25lzE6.rJ3','user','ak_1f4835147f6dfcbc','2023-02-28 10:08:00',NULL);
INSERT INTO `users` VALUES (5,'admin@company.com','$2b$12$SwCcl3YRa1CaqOJrojW4tNveodyOrKAruVxEMevPMGW2gnbvLWOGU','user','ak_4b2d15ebd65c2494','2023-08-02 10:17: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=9008;

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


