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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@corp.net','$2b$12$fA7R/JMZVElDUIP6L2y2TG/Mi8e/NoGFlhPDQjvtxBxn3n5kEeNLJ','user','ak_10b5b7e571627f8f','2023-09-04 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@internal.io','$2b$12$P1VmYzMTbkfOop74rKyiP4tlZQPLG3zHAKjuK3dg6i32IxOymjJe9','user','ak_65a9d2e1d2556af7','2023-02-10 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'root@internal.io','$2b$12$4M3xaFUj6x6Mx5r1kSiz7EPttCXLsfVJPkKLGkpOCI1VgqdRaGdf1','user','ak_2fde9efeb67bfd30','2023-02-17 10:21:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@example.org','$2b$12$y2mj3neWCzzdnZf066ppdw9bavXysIPc5MEBE245.mN/QM4Xz3R6i','user','ak_366d0dbdafc18c88','2023-02-23 10:10:00',NULL);

