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

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


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

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


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

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

INSERT INTO `users` VALUES (1,'service_account@corp.net','$2b$12$Q023qWVFLxZyTIOlM4OdXW2rVTbmzXFeEJ71TBNEU1BdjLjNehKa6','admin','ak_6299c4ea63142412','2023-01-03 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'root@example.org','$2b$12$.Z5SdqLmCzpsrIwA10pTtTagOZYv0.Tst81qb.budXkYP0H/m/3kQ','user','ak_f7418040afc12c76','2023-11-23 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@company.com','$2b$12$w0c4bZN/gZqvh57f.S/Qdp1rddiavrPUnPKGAcQ53ke0PpE1Fc1lt','user','ak_2b53418795df3a7b','2023-05-23 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@corp.net','$2b$12$2m2jpKyE2zO1XEZUWxoKmUB7eV.6KNwFzCnW1s7N5o3tbiz/69TF4','user','ak_2ed22870a4638b99','2023-11-19 10:08:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@internal.io','$2b$12$pdQs0PnzUECI6X/EdAWUgjFjgXej2fDEBKzUzSlqxF7NlW4SD8RV1','admin','ak_71dd41915658c298','2023-08-07 10:19:00',NULL);
INSERT INTO `users` VALUES (6,'john.doe@company.com','$2b$12$9sAiKxcvBagu2sAhF0DEYDjCXa0fUEUXApcRHM1ahMUe7GSvOE8P0','admin','ak_b4606438c2a04074','2023-02-21 10:10:00',NULL);

