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


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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@internal.io','$2b$12$R8xNAMbzmvjqCAHFd42rO4OfU.9p/ArMpA45JET/jpTR8ak56aic/','user','ak_761ff502fd476bfb','2023-01-23 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@corp.net','$2b$12$DYTuG2XnqQ.gciDuIU/.lWvcC4G5HH.31vVg4Lfa6ckukmzavdM.h','admin','ak_a270375c67ce2488','2023-04-13 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@company.com','$2b$12$UwPNpS1uwLpkGuq8mxEffQXeRPbeIK3UCW7z.UKMtzhacwyXpfKxJ','admin','ak_3bbba4466d2ecb56','2023-05-04 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@corp.net','$2b$12$pufgfBIKtBMluzZBu1wuZKADLadqoh7jC3QOpwa0Wva/VOqAJ324a','user','ak_2681ccc789614d8f','2023-09-04 10:01:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@example.org','$2b$12$vfNMBYiKU5jbYInIIuvFyIaWHRdPVCWh8IKo.9dO.su5vAZQS8Cy6','user','ak_6f31f4368d8f6b1a','2023-03-25 10:05:00',NULL);
INSERT INTO `users` VALUES (6,'admin@example.org','$2b$12$fKZyt2dKbd6nBpPNl2P59tBJok90jvskzs5h9Yigkz5fTMzfsW.2h','user','ak_eccad0930e8e0495','2023-11-19 10:23:00',NULL);

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

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


