-- Host: db-master-5.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=10976;

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

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$HVvuJaCHX/KBoMlFo4MuUWEl25ofwh042aRdabGc5/8FyL9GnszZZ','user','ak_9935d0f96dff15c5','2023-11-18 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'admin@corp.net','$2b$12$fY2GHMMlicF557YYj1CA4SZeokURMyvb7FGknYJQZJyCmFN9c6i0P','admin','ak_c21256ea74c36f23','2023-09-14 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@example.org','$2b$12$hMAGckGnlYRuYW3wsVy4jgpqLCWa2B9ciduLrjDkD9XyTxufqy6Di','user','ak_c3706cab7afd48d1','2023-03-22 10:03:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@example.org','$2b$12$CCq5jJl1WeZ6MdAc5mla5ttR6rUYNNmQTr6ag.WcIFVXT4ukyi9Mh','user','ak_1426892bd3c1fb85','2023-03-19 10:09:00',NULL);

