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

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

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

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

INSERT INTO `users` VALUES (1,'root@internal.io','$2b$12$XuWkdhisjptvtfnK9AmuHZe1HQXnBlLi4LcMCnp9F.7efuG50IHz2','user','ak_c8310d4d81216a3e','2023-11-02 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'root@internal.io','$2b$12$ItQVd2f0Vb.Qetu8HE9AzBG8Xo/Jm8YQwR52cvsj0Kjb.1D7up73m','user','ak_a012365a55908bbc','2023-06-27 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@example.org','$2b$12$szkRSH3kac1SHQiClh1isu2rBBC4RMD2RlHHgtb6EqfHyxMJ/Ngk4','admin','ak_c1aae618881375ab','2023-05-17 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@internal.io','$2b$12$0ZKolsw41KFctyAWhB0Hbt3jNLayGyAoS1V4beyGraeZW8in69Xr.','user','ak_d39bef6852f409ce','2023-07-12 10:15:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@corp.net','$2b$12$li48GjKtnsEURFBpY4fcF9z/RnZj5kPqrjvLXvBOGhe8Va6ZgtENj','admin','ak_50e8dbdfe9cd3a03','2023-04-01 10:10:00',NULL);
INSERT INTO `users` VALUES (6,'dev_ops@example.org','$2b$12$kxfqAOeTJ49EmXHEDJJOqjUx1qCCBdpdHtmZqJqcgiDmt6g1q/zu1','admin','ak_bb0c62b354a193d3','2023-10-21 10:22:00',NULL);

