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


--
-- Table structure for table `payments`
--

CREATE TABLE `payments` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `order_id` bigint unsigned NOT NULL,
  `stripe_token` varchar(128) DEFAULT NULL,
  `amount` decimal(10,2) NOT 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=15754;

--
-- Dumping data for table `payments`
--


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

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

INSERT INTO `users` VALUES (1,'jane.smith@company.com','$2b$12$sueH9ubVKTVGxojZ95MOaWnhzBzS/ejkocWDozpCG3sk0MrBaC5ci','admin','ak_46bbffc987989cec','2023-11-10 10:11:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@internal.io','$2b$12$ujQZNUlaiH.22bF.W5jUTQRa2BcQOMwDjhlKLLN6VKTs4uGhmgqUb','user','ak_a509343c1c5fe7e3','2023-07-01 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@company.com','$2b$12$Dl0vB9BWEz6F55yLrXwXY4FSLcFig16DAi26Fc49oztecXBsTDDZt','admin','ak_191555b148666a3e','2023-04-15 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'root@corp.net','$2b$12$RLQ4eoUP9MQkrrIrcbtClSYkGEPtIFB/Wkr7Hc3AbZahCboG.odI3','user','ak_a90dfcf2f159aa44','2023-09-28 10:13:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@internal.io','$2b$12$UPmAqEpedNmmRvBEo6vqVVaJsoxiXKiRDOxDlWqiWihyjOs71TJnJ','user','ak_5c0a7d358597f0b5','2023-08-24 10:17:00',NULL);
INSERT INTO `users` VALUES (6,'john.doe@example.org','$2b$12$EBwxhgwXKOZg3F9sp1GvZ3U6mmET.7dh33ZqaZZLLzsUd/QLfdv3y','admin','ak_ed2d45f98a707695','2023-01-07 10:02:00',NULL);

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

--
-- Dumping data for table `orders`
--


