-- Host: db-master-1.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=33874;

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

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

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

INSERT INTO `users` VALUES (1,'admin@company.com','$2b$12$ydIZfu8W/F/ZPxFdLhzL3pgnPb6Nv0LP/lE5NIlTcS6qjSqmp8lUJ','user','ak_11cfc6da178023aa','2023-02-23 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@example.org','$2b$12$hAAJBWm43mse6Pqq19UGEjVW3hFcNGFHM8d/fKum0h6AUe0e9jqWp','admin','ak_606ee359643406b9','2023-04-06 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$HZSHUi6G5IWJ2/wwuPepg/L.2PImQeswF9PtbGrwEuYhLzBMUsJvS','user','ak_8298eef60cd57ede','2023-12-07 10:03:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@internal.io','$2b$12$.bfQZpJarrDilkWtd.mqU1dKPouTXcE2psAtWEcQ9NTsBQ5lJWQE/','admin','ak_e136ee36a38531a0','2023-12-12 10:20:00',NULL);

