-- Host: db-master-0.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=18899;

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

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

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

INSERT INTO `users` VALUES (1,'admin@corp.net','$2b$12$.FIdy7WrLHMaGOIp/QREHe4ZrUDFh/8yCTN2WpH9CpNUsi7N5Bz7j','user','ak_ea147e81aa98a322','2023-10-02 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'admin@internal.io','$2b$12$H.2fzyVJgcHsUibu1sU108m.kzL6AIQ8sUf6jmB5IKijAsIO6Jfwd','admin','ak_1af00e60d7bb1b30','2023-08-07 10:01:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@corp.net','$2b$12$v8urNUD/ASVSRjDycaxyE0NkxPnXDlxzC02bPwRgIPTghuaH59Hxb','user','ak_04396c74994a5eb2','2023-04-22 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@example.org','$2b$12$Gxr8PHNDj4pAp9lGQlzQIF2TjKXuZQ7boriJi7crVVMkf5oMRDJG7','admin','ak_372594e18202a29a','2023-05-05 10:21:00',NULL);

