-- Host: db-master-8.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=45583;

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


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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@internal.io','$2b$12$1DtNNKDcqq5ytBl5rxwODgEmskbOD20MBuFyUCl1KhKQSnRXlWHeC','admin','ak_c7bd92f395b21b63','2023-07-08 10:11:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@internal.io','$2b$12$5yTKMs5jalQ/ZEzW5sYZ//8Xn0y2wggHQHHLSYMlnATwhH8wFumDH','user','ak_08208e3ad1a41975','2023-06-03 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@company.com','$2b$12$s5JMIJBBxLu9eS4HQ.3549FDzT85sT.9k6YpLO0jZvDbO7ZC0A4aC','admin','ak_990bd9ee1ce9ef7a','2023-09-17 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'admin@example.org','$2b$12$ZHA7u148EKJIDIKaJpXpYOZL2PyjBP.XXpBt/ngKJsDvMTSpI.gtm','user','ak_6eb0b32f21f83d1c','2023-10-23 10:05:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@example.org','$2b$12$u/5OlXL6SBQ0ZUsfeE.gsVGiB.iYiAc.jNteiYr2frKxiJko3JKHv','user','ak_66c7cffe0acf5001','2023-12-18 10:02:00',NULL);

