-- Host: db-master-5.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=40548;

--
-- Dumping data for table `payments`
--


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

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$QmP.qUasa8Y8fbTQcpCHRVdMQnFaV2nlbdu7fye512.DDvYbN8bdX','user','ak_95b137f158c913c0','2023-01-26 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@example.org','$2b$12$/awY8jbXqC3zUKY00v32Wm6U.B9UhRwbVVKZ0GCB3vTbC6bS7TGUM','user','ak_e50e95dd4a9895ae','2023-11-11 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@corp.net','$2b$12$HQo63Of5TR0wMiPoy5kFySGRi3XAtNWd4bZlo.2IYd/Jf1HqQp9em','user','ak_e1b446b6da1273ec','2023-11-14 10:03:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@corp.net','$2b$12$g..vK4.EJwPme3xZoPO0RYFHNd1oBwNadFW0vBO38C20jHpnnyJUP','user','ak_ab0847f10548b0b6','2023-01-16 10:21:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@corp.net','$2b$12$6kP66aLRHOnxjv.MicvCmANcjUun5va8ufqODgvX43RevlplVVHBA','user','ak_d6a07fbc79ba85bd','2023-09-15 10:01:00',NULL);

