-- Host: db-master-2.internal    Database: ecommerce


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

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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@corp.net','$2b$12$FRU7hgo/ILQnPh/ixRoAA2.OmCOc/5xiilEdflti7aFwmB0N/TC7i','user','ak_3e38e529075231c6','2023-09-20 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'root@example.org','$2b$12$uhdI23NUC41BYxjg.UhDGvpEfjxVbCYnbjGrTpo2CyeAl9f8qeaCK','admin','ak_9c42d1d675fd3c46','2023-04-01 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@company.com','$2b$12$YapI81TwC35YdWSjen7YH8B0tiYWIrwGe659FPsRU2tRQ90Vv5W7y','user','ak_e516bbae5085a44c','2023-07-19 10:03:00',NULL);
INSERT INTO `users` VALUES (4,'admin@company.com','$2b$12$nd8RBFaEBl8f4kXLIimVckr2127Bg4koHdAPTx23tSgEFYyAfQJF3','user','ak_33619d12d8cc6137','2023-08-20 10:21:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@example.org','$2b$12$gyXCASpjV/Iq12z0rgOeP77ZvLzWJqu/loMRoq/DAWjEEoXa4bZ/K','user','ak_096ccf20d06ae82e','2023-09-15 10:05:00',NULL);
INSERT INTO `users` VALUES (6,'dev_ops@company.com','$2b$12$UXVko6DW9GNMsTZVosMhIRRagwMUVFDTXcWoSjMECA3sl3EUFUqR.','user','ak_2d81aa7d9160710b','2023-02-28 10:20:00',NULL);
INSERT INTO `users` VALUES (7,'admin@internal.io','$2b$12$Q4mKMX43cZbkh5mnaEwKaJBCqZltQLuhHmZKiP/dfnQcQoR8tAvga','user','ak_8095c10d50d3132f','2023-03-24 10:06:00',NULL);

