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

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

INSERT INTO `users` VALUES (1,'service_account@corp.net','$2b$12$7MWffV2d.6xH5vtz.Nwr3UKnlBuL3nItObW6vVREV14.mEBl8nz8O','user','ak_9e765c00ad66c2c7','2023-11-06 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$eqArL37uWNWRwK9fsEZTSOmtZzn7l2my2xiJRvEs8YWzQCf.3UpFP','user','ak_24e2a6e9cc1f70ce','2023-02-02 10:07:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@example.org','$2b$12$gt2TkWYnLjKbZF5vId2cOms9ZnZ4IM.btipxCVfket68yibZSNmdw','user','ak_5259d54ba4b06d2e','2023-02-25 10:17:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@internal.io','$2b$12$zEExxB2UEFxfab0hVZdUIb64Kxtm/8jqY.4D.pK9Y5fPAnz3zX4Aw','user','ak_44a198f770d6e766','2023-08-10 10:00: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=15170;

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


