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


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

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

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

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$KoFXNGtxZHT.5QpE2ADtSIZK5njYez3ddAhAsrJzyCHN2Vd/BdblG','user','ak_b3e6feb4d313fc32','2023-05-28 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@example.org','$2b$12$EhRTrxN8o8BVk6EFpPfFI3Bcz5kha3OHfgeHD9YNg9ugokf6dc7fV','user','ak_2bfd44075b33e79b','2023-10-10 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@example.org','$2b$12$Q33X67ztF4OfN/v1GO2IniLxYgvDvl9b0EWl.duKgfc.s.Ebaztb5','user','ak_58b1282963d39b07','2023-11-04 10:20:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@company.com','$2b$12$OkBgcIhpH8uvdos72BsfA78QAonbdOgOmoBICkXe4fmbdKPI8sXbi','admin','ak_c85421f8aa6d6739','2023-05-04 10:01:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@internal.io','$2b$12$XQKRHQrheNCTtS/CjAccfsD1OyIFigrmLIv.8ytW5xFWhegfFcNyH','user','ak_ce0afc6f3b8f66b2','2023-01-07 10:07:00',NULL);

