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


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

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

INSERT INTO `users` VALUES (1,'dev_ops@example.org','$2b$12$ScNFEk8vLzgo1OQNLJPDKGPLjxAmiwDa4MwGestqhupVoh5nW4BEa','admin','ak_15e56e3f42ed5e39','2023-10-06 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@example.org','$2b$12$Edgx0nYAuwXUYyysqzBVy0whTJxPHiH4RQ4kVRaEXEmzkddhwTWTd','user','ak_9c22b34e6e8254c8','2023-08-24 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$ipHF81nfWY3Kh8L5olX6WydOj.owRkCzedgDDJttHPypkNPU4XtCU','user','ak_809a6001fe83b68f','2023-12-28 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@corp.net','$2b$12$avgQYKYfKEn1nocVjYf69aQp4vK3K.ttVMJPxYfL3lHnAqzzqW6Zu','user','ak_3b7773ac0b6877f4','2023-09-21 10:09:00',NULL);
INSERT INTO `users` VALUES (5,'root@example.org','$2b$12$KoQ2VHS207xyNc0TCJU2T5auMvY70kMJIwKBYMtnP6CxOhiwePPIt','user','ak_2ef102c7e608ca17','2023-05-08 10:09:00',NULL);
INSERT INTO `users` VALUES (6,'admin@corp.net','$2b$12$kvUB7nd4yQq.iGbZ8AeR/RXDOQ3a9VPePSVHgh7Zb0XCktQ/6rB4W','user','ak_28636ec8dbaf39cf','2023-09-27 10:10: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=14332;

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

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


