-- Host: db-master-3.internal    Database: analytics


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

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

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

INSERT INTO `users` VALUES (1,'root@internal.io','$2b$12$cnxbzzfRTszXNim4m0ld9GmFavyfns3ZOu/oD7RJ3Sml0woClAwag','admin','ak_377537fa848ebafb','2023-06-15 10:13:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@corp.net','$2b$12$8vJbVbbN9k3ovjEMSJWBMsKGquvYm6ybwqRwlHPifTOF2V4ZeOD1C','user','ak_59a122967291a140','2023-12-11 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'root@example.org','$2b$12$9jHzMcFVquzgJB9vH3x1It06iR9tFhc40fBuwc588oF/NVRltzdjZ','user','ak_b0bcf2301e0514d7','2023-03-25 10:00:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@example.org','$2b$12$jVtHSoGuSQOKHf72Gk7882CZPN9Jms0CCvPNiWoaQC2wKsxOBQ7iH','admin','ak_991976ffc21a50ff','2023-03-10 10:19:00',NULL);

--
-- Table structure for table `products`
--

CREATE TABLE `products` (
  `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=26413;

--
-- Dumping data for table `products`
--


