-- Host: db-master-6.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=39006;

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

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

INSERT INTO `users` VALUES (1,'root@internal.io','$2b$12$jhBVC2XNvRWZ1/yDRePDhjXAlWWUyOyjIM./2ReiI60i8nr8.APmc','user','ak_b19b0d1531d66d82','2023-06-27 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@example.org','$2b$12$JPlrDqfeLQ5EristtnfHUhUrDyhW.BmMw8N.dEDDUYS.42DswsM1V','user','ak_f0151df56023af13','2023-12-15 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'admin@company.com','$2b$12$vPoMuhBI0brEkRXC/KR6r2T8x6q/oSx0gRRmaU6goE.WzMWcqa9lu','admin','ak_ab56eb1e61311403','2023-08-02 10:21:00',NULL);
INSERT INTO `users` VALUES (4,'admin@internal.io','$2b$12$0/lZo42g82ExgpJ9AF0Fkb7EfGVfPg284rnvhzvlbYp7Uru4UA7NX','admin','ak_63d8bbb3df1b830b','2023-10-20 10:16:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@company.com','$2b$12$tK31qZq9xseqkCOYey2o9NMF7jdueROTNlj5HYJ1as8i7tYiXIddQ','admin','ak_58634877c7a89636','2023-01-19 10:06:00',NULL);
INSERT INTO `users` VALUES (6,'admin@example.org','$2b$12$9bGz56fz.BQs9dS13M8Ezn5i5IcycqR836Idmw7LOOfShnE3lhfd.','user','ak_f88a2812896014aa','2023-06-24 10:00: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=38780;

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


