-- Host: db-master-8.internal    Database: customers


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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@internal.io','$2b$12$auZS8yRe7V4Bo7j95QSVSMSbO5TskAJFYS3LlrHi4GR.6Fx/nV9mI','user','ak_bab9e0a4dbe2d281','2023-07-15 10:13:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@example.org','$2b$12$8ywWx1M2Lu.TItKbHEKDl4Fw9jAfZDyG4jPqtgiapHE0s8a6mYtu/','admin','ak_a7cc9bf0231f9a2a','2023-02-23 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@company.com','$2b$12$apwu26/lCGs351mDeu8soSdbGWhwkMieoUSA5V2uK6uYePdJt8jfc','admin','ak_aab0b45207746a7c','2023-12-03 10:17:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@internal.io','$2b$12$44jCgMYE/bc7j0txtQBgRxKMp86JJGLZQiJjefYq9.xJV1x7i2c55','user','ak_cd50b6ad1707b993','2023-10-17 10:07:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@company.com','$2b$12$asLozd8/s7R6CPx.bpxjuJRrlAeBCp6d0wSH4SX1hELa5D5keOleK','user','ak_c56207675ada43e7','2023-06-27 10:07:00',NULL);
INSERT INTO `users` VALUES (6,'root@company.com','$2b$12$0OjGsL4CzpokH3nge1iG3J2RO0jF7zGXqHlaA.1cSlxzMHPE6G8E6','admin','ak_0d5256394b10dd26','2023-09-05 10:20:00',NULL);

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

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


