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

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

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

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$RrPNG.kTJtH2j/Jf4gVXE6NsIFJjEQ.jEo7l9Gi/60x6kwBG0YZVR','user','ak_79ac65f56d6632a6','2023-02-28 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$jgOwTbUy.e3xc0Ciar0H4h6YvNHNM3MU8bkNBUq9EVowzJd4HK9co','admin','ak_4223f53093e19848','2023-03-02 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@example.org','$2b$12$NuLVxJwsUqcvS12pGurfNJZRCfznotvxK.NvB95E66DaiD6v/dJRB','user','ak_2379a2796dad636b','2023-11-07 10:16:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@example.org','$2b$12$Ge.XVhObtLbtcX87JJ8SIHHB4O4j6UpG71WHHCYYM38ap6wH1O/uR','admin','ak_6276552957310e0d','2023-07-06 10:07:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@corp.net','$2b$12$pcpEYKiE/pGMSwWccUOQeSrQVM3WtBHVgEqMGODFJdlsY/6uNV44O','user','ak_28d832b60714b11d','2023-09-24 10:19:00',NULL);

