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

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

INSERT INTO `users` VALUES (1,'dev_ops@internal.io','$2b$12$uGj70ZhFxEEKH/qQA.dXO41PvQfDLcs8KJ4.qOycdEiqAKoVkvWJb','user','ak_7299e1be40976e0f','2023-06-16 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@company.com','$2b$12$CWWA2JNION0WrpQTelGpZkS6xZlwPgfctxbXycFB1wDRoIp3Lvp1m','user','ak_df159467fe615ae4','2023-12-06 10:01:00',NULL);
INSERT INTO `users` VALUES (3,'admin@internal.io','$2b$12$cpsHKgByvECR/67uO2QAZqIOBJ3eklUWwcvG8qC2FhpBWkyz0BzF.','user','ak_7b79776af7f96595','2023-08-21 10:23:00',NULL);
INSERT INTO `users` VALUES (4,'admin@internal.io','$2b$12$vgHMYT6e8NgQ96gzObD9MOxH7.ASugRT3O6s472cE..iqTjHGm0XI','user','ak_d87b836e5bc637d2','2023-03-13 10:05:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@example.org','$2b$12$OpxS7YbEBcGOE13SHoSI3BIsw4aaRBpR6ZGEgn7EvEtNx3E6jMEB5','user','ak_a0a72dd7b113549c','2023-01-27 10:13: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=18187;

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


