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

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


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

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

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$Dxft1E2Wv2lkarbYFVzgFfszlw46DNP1K3XOUCeJPAwEmXxVCzVRy','admin','ak_b151f1e0df66869e','2023-08-06 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@company.com','$2b$12$xWajOukvI5QfA3pDmvZanGa5mDLvtPrfQHVi2To.o/BrJnaS.lWWD','user','ak_b42811e08365773c','2023-11-07 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@internal.io','$2b$12$BY6reOxjciYVsj9Xjnl78WrwHWx5YMpQfw9qhaha.9Z/UJkqlFyom','user','ak_43980b51e9d868cd','2023-01-17 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@internal.io','$2b$12$y7H3V5M5xSojsu1YHJoDmq3FxgvCBv0bAtAPlnaxVCa0eAj8SaIVV','user','ak_40df34404244b5ae','2023-08-07 10:15:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@internal.io','$2b$12$gjkZBKxCBWF761Evu8Xwuu1SOA3lZWBeDQaZYSozusNzKpkvfcwi8','admin','ak_820737ae6a2f0e18','2023-11-08 10:07:00',NULL);
INSERT INTO `users` VALUES (6,'root@internal.io','$2b$12$6uuR6kkomSvbG6.Sp4fHithaP5hvfGV/BExTrXnESaADNDJVak8f9','admin','ak_09908abe4f3ee18f','2023-02-26 10:23:00',NULL);
INSERT INTO `users` VALUES (7,'john.doe@example.org','$2b$12$Remvb5TyP0avioZLKejccphHlMoga9evh3bSxeFN.azzbZzITaqqw','user','ak_6b502a65dce63d97','2023-05-06 10:10:00',NULL);

