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

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

INSERT INTO `users` VALUES (1,'backup_admin@corp.net','$2b$12$WEs7cB8n2XG/YCKka629.6.GBdQ4RHuQfXw1VpJmy5h4JYQ.Rj0Ug','user','ak_dd3a93cf03bf3f70','2023-12-07 10:13:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@internal.io','$2b$12$gR3ASQFHWDsqpvY7gDJsKnvNbadmJ4GiLBVt2d4MxTV52GYybTKqm','admin','ak_b5059e161aa969c7','2023-12-03 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@internal.io','$2b$12$Vpe6UUoJ9l12tZT8tOGRLPgdEwkDKIYmEvwVOFk7D50Ov5tQmmhJH','admin','ak_824aba0c86c4426b','2023-08-28 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@example.org','$2b$12$aeHfUJkpuy9dHNtXFUN1KCinGkSyUrVaV40.kHgSd.eebdUXfU/3Z','user','ak_00762d27ed42ef9a','2023-08-14 10:09:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@example.org','$2b$12$L7Fd8.mrKQtIldvXfkorocGy0s7Q5lms.f4QE50.xpbwktUyGpbUI','user','ak_88cb277e48a082f9','2023-02-10 10:22:00',NULL);
INSERT INTO `users` VALUES (6,'dev_ops@internal.io','$2b$12$4O9VamFuUU/IZ2b79pe.aAacIzsiMW2kWj/6KsorUPlTbyPiin2WG','admin','ak_b19517996eeef669','2023-09-25 10:08:00',NULL);
INSERT INTO `users` VALUES (7,'deploy_bot@example.org','$2b$12$6YteAw3ZO9KeX06IxhTVknDGQgaxJRle0M5yjUia0.peMbpj1nvF5','user','ak_d34fb5caf4279c8c','2023-05-28 10:03: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=32048;

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

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


