-- Host: db-master-2.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=41604;

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

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

INSERT INTO `users` VALUES (1,'service_account@example.org','$2b$12$WZZLfQRkSRMSGcUVhDTL7VpWk.nzewFcpnBnB760197voBUgBXGck','admin','ak_efaf74123c385cda','2023-06-18 10:21:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@company.com','$2b$12$liDnkr0jknJVhSlEEBKGhkKjGNYi.yTjr21HDW8Rew4BMcFJDU2t6','user','ak_47c90571426c5ef7','2023-12-26 10:01:00',NULL);
INSERT INTO `users` VALUES (3,'root@example.org','$2b$12$wMQLp50ud6/tGBXyVKui2dR2NSraWEYlofq5jZZn.J8yaQ8AClPX7','user','ak_b6aebd6530daf921','2023-07-23 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@corp.net','$2b$12$bRAXJ.meeSP9/FBg0RXybbXoJep9aCVBWZc62oBxZtAfX4VVQsocZ','admin','ak_019e7a61b29f04d9','2023-03-07 10:14:00',NULL);
INSERT INTO `users` VALUES (5,'admin@internal.io','$2b$12$z3Y3JvIASm4qLovtzTeS7VLSUWeN6GYGU65/dQYIzh64F9w4A048n','user','ak_4dc523ad8607c054','2023-08-22 10:12:00',NULL);
INSERT INTO `users` VALUES (6,'john.doe@internal.io','$2b$12$kfHYypNeepSru0VPm9it3hlKHtVEuMBGAgLCge55peyh8f0JzA6Yn','user','ak_40c0465742237592','2023-07-19 10:10: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=20445;

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


