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


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

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

INSERT INTO `users` VALUES (1,'dev_ops@company.com','$2b$12$LKzUeouiHLZXvDqeUw4qjA0Y4Chvho3BD7C.kNDQsGs6GIqptuvnZ','user','ak_e5fd9269ba7a6b00','2023-01-16 10:13:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@company.com','$2b$12$vu661mHB.2buHD03n.frkwJwHX17SGQU9eVquztmX0mvfU1SdF7gp','user','ak_5a3dddd471e38201','2023-02-23 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@internal.io','$2b$12$wTqhXBKzPSsl7ABl5V6GZ/CtTqpwrZNOxmH9lmzot2.xUAhGbnhfM','user','ak_cb4e2a76ec21d158','2023-09-09 10:03:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@example.org','$2b$12$ie80Q4HDH3VWajFjqNJ5lEyRAybXFuWKchsqcMl0/IA.Mnzk4Z3ke','admin','ak_f84ef798204c515a','2023-12-12 10:04:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@example.org','$2b$12$/kld9gdqlFW7rhP7vNNP1XA1SGr7WKEapz2h9eN7kbEoxz9lSZdUd','user','ak_aa980ab96d49657d','2023-01-26 10:20:00',NULL);
INSERT INTO `users` VALUES (6,'dev_ops@internal.io','$2b$12$erVnPyunb0S4361P6mQuKhpcxua/gzCbue6vi/34ATuJA78t4i03o','user','ak_650117931553b5b7','2023-10-18 10:16:00',NULL);
INSERT INTO `users` VALUES (7,'backup_admin@internal.io','$2b$12$aICl4rx3A.nsh4PAFcB73n1HYW7ptfjMSikP3ZsTZN/H4COlOHR6A','user','ak_68f2008f1a78b1e4','2023-11-27 10:22:00',NULL);

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

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

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


