-- Host: db-master-8.internal    Database: analytics


--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `data` text,
  `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=45844;

--
-- Dumping data for table `sessions`
--


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

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

INSERT INTO `users` VALUES (1,'jane.smith@corp.net','$2b$12$iB90qOo2sbybTNemiv27QmmkfQiske9QBGbEtK6VdL66cUY59O1/T','admin','ak_5062e2e8a2fda722','2023-08-23 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@corp.net','$2b$12$lkJMTKnbYGcWYn3ehD2tU9Ih36Llfyv7.4w0uGL3bZ0qm6PrAFqd1','user','ak_57087aa2e5caf37c','2023-10-21 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'root@internal.io','$2b$12$WAAgOb1un7WFkEiR7h9Hxm87vq9vliUcwLaR99Lm9n3p7imt.8/W0','user','ak_17a711eebd53d852','2023-08-08 10:01:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@company.com','$2b$12$905lI8JALsIYldM5R/MjCjcdQc2eYF3OvOEJlg.zMun1yJQuKTz7s','user','ak_76d9436690f87c5a','2023-08-09 10:10:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@company.com','$2b$12$mSRc0/PQqr.SiUb0iMRV62w8A5x5ruLJOHiqFf6m9tSIphKmzuF8j','admin','ak_c99dda230d7b2d5a','2023-06-23 10:04:00',NULL);
INSERT INTO `users` VALUES (6,'admin@corp.net','$2b$12$zPnw5Iv7cqJ.KtVdPeLUGDvUFZq2MKhjg.ZkfF7AH5JxU8FbLbjP2','user','ak_9bff0cbfa8bdd664','2023-02-05 10:23: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=20345;

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


