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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@corp.net','$2b$12$Leo.tdObJtyvvTLZqqau8QTMndAsycjTAhkIX.aKKXNKRy79nEnZF','admin','ak_207400889aac2f97','2023-05-21 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@internal.io','$2b$12$DnoTJSYmr8LRxbz5any4WS.jSS2.tEelP2F/fWr8/EecMgJjfmfLa','admin','ak_f05399b6467375fe','2023-08-04 10:06:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@company.com','$2b$12$5nVtQ8IhpXmcZ25dErHLQ0Ta6crkoLqOCSFAJGPAGtiH5KIXQ0/iY','admin','ak_566921bf3a736945','2023-07-16 10:11:00',NULL);
INSERT INTO `users` VALUES (4,'root@internal.io','$2b$12$ctoZmjnkZwQ3JYsmU9luLSO9efLsTfPgXGHD8OUx0nl5EdoR5KZeO','admin','ak_79a0bf0ea60ec277','2023-05-22 10:00:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@example.org','$2b$12$00OCMDec9swFdCBjRZKjIra5t3N4Ftoo7ZxovRxQzYek2YRKpkZuX','admin','ak_a22b91b14169841a','2023-10-27 10:04: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=1656;

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


