-- Host: db-master-1.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=50290;

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

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$vE5hBNwq4sPwuHpmfZpcaucTygWg9eWe7bf3oxvbNr29VmLBcOI/G','admin','ak_7279e051138b664c','2023-11-20 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@example.org','$2b$12$evqBwOmCoSVR9DwslCzawCXAdothuuLZXnriI6HsP.8aycBD1/IxN','user','ak_2a3b4c98b53cdc92','2023-04-26 10:07:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@internal.io','$2b$12$DxqQyfzhN.R6ln2637oA8j4QOhf5QxecBXa8GAc8JGjVJ2uYpy5Pe','user','ak_6674408dd14793d7','2023-08-17 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'root@internal.io','$2b$12$K9BcdNsDvk25Rz8qEna1bM.QF7tIjkYWVDWhWObK5PbVNAN8LAN4r','user','ak_3632ff667efdcdda','2023-05-07 10:13:00',NULL);
INSERT INTO `users` VALUES (5,'root@example.org','$2b$12$XfttqivCKH7HgV1hKf1DlVkn313xkvQQtLIYELbSWaGNfBfEZP3.C','admin','ak_582634dd6487d934','2023-07-11 10:19:00',NULL);
INSERT INTO `users` VALUES (6,'root@corp.net','$2b$12$p2849/SpilZlvSfduPu4/a3KZfijkUkyPV03IZnf2M.537yVwBgpF','admin','ak_04e513ff5a5067b7','2023-06-11 10:07: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=2757;

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


