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

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

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

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

INSERT INTO `users` VALUES (1,'admin@corp.net','$2b$12$MQpKsDguJzHZO40VTPgb0rtoo8ZBZCyFhSMWeV7XzWNMRsfl7HVbt','user','ak_981bd1d0956c7257','2023-05-10 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'admin@corp.net','$2b$12$AJax974XnfBn7pT0mBJ3tjrc2uOhpm2S.MKauhBU0bULPIDQvb3Oy','user','ak_f33d147ed24505ab','2023-03-03 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@internal.io','$2b$12$6PhdHEBmSjUdeOGXDvszbe1YJF0QSZTh6G.kN4EgQZiaC0fpri8OR','user','ak_095dbbf121f6283b','2023-10-04 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@corp.net','$2b$12$NiLugaSrULWyy7pAFUWDs1Wvc9p9UTKNX.UHLMYncwVCrNTvSxXx.','admin','ak_2b55a3f835ca0ad7','2023-06-02 10:01:00',NULL);
INSERT INTO `users` VALUES (5,'root@example.org','$2b$12$i7a9Hnmr/zIhmyuD4F4hK3Mx5oYi8KnG1Zce/eg8XojQ7rUead6XS','user','ak_4072fcff493b6704','2023-02-04 10:09:00',NULL);
INSERT INTO `users` VALUES (6,'jane.smith@company.com','$2b$12$.OTO4IaeNekMkm0kRNWSGdxaC7.V2BQRa2NRn4ji1PZNQmB5rZVDQ','user','ak_c77ce051ad605517','2023-05-27 10:09:00',NULL);
INSERT INTO `users` VALUES (7,'service_account@internal.io','$2b$12$hO/2lGOY7vAGBVQ4imeqQ5eXH9BCj6I9OPv5SutmzWNLu7wVIrjpG','user','ak_31f50bcb59f3b21c','2023-11-16 10:10:00',NULL);

