-- Host: db-master-3.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=13362;

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

INSERT INTO `users` VALUES (1,'deploy_bot@internal.io','$2b$12$i6YjPwUdB73uTJYOVrxIeZLZJSoWSGM7vs55m4KUgi5JG0s8pPF7R','user','ak_5568f50d5c0a7d83','2023-01-01 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'root@corp.net','$2b$12$FoYsrogduEHB1L5P38eHZtDkW4hC76/Bq7oTc5MkjlufbxBT.VWeQ','user','ak_2eb126c112b1ee12','2023-08-24 10:16:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@company.com','$2b$12$wM7qI0v7fMJOGXnbyryxpeVoSseNJWRpfUo1I.zEdmKuYelnGQ6hP','user','ak_1144703359e0dec4','2023-09-14 10:03:00',NULL);
INSERT INTO `users` VALUES (4,'root@example.org','$2b$12$VU4HCmvhamAQPjUpXd/s8.II3HvlZNCR4G5.Dt8fukEMMg8k0ob8/','user','ak_6d55699fad41895b','2023-06-01 10:19: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=4130;

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


