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

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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@example.org','$2b$12$3ywAfzCp7G/LtpnWADu7/HzsD4j.ILB5ocqD1O6FTUns9S0lk50b1','admin','ak_e04a548b8775e2cd','2023-05-07 10:00:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$qkk3nLGM.RdEwlhUHisbpn/yJzQTf8FWIN09ogX0TpYLj16zrC7Zz','admin','ak_165b5fdfba1edbe9','2023-06-11 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@corp.net','$2b$12$ceQw50mQj99EP8zHieVbyBqps7NuF4M7KJnGLBexm/NReuDIB3hr0','user','ak_1305f678def0be03','2023-07-28 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@internal.io','$2b$12$g0vD5BrpZ4VEoSLOC0tjGQNb3FRbSqtP5yzGzCCo.seKaE8p5n.MP','admin','ak_2108bbeab57cacfa','2023-06-22 10:21:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@corp.net','$2b$12$qrQzNPWO4O3Tf/4PWgTVvcvhoz5Fvj7mmspb5fVZtFZvpO6QM84vf','admin','ak_71ee55d47c0ab293','2023-09-27 10:15:00',NULL);
INSERT INTO `users` VALUES (6,'backup_admin@corp.net','$2b$12$EL1gmXxUw5awDSqGEVjrJNkXXH.8oRhMX3Rn..urPxvKzAsBV/83n','user','ak_35591fc94a572f1f','2023-01-11 10:00:00',NULL);

