-- Host: db-master-0.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=42151;

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@example.org','$2b$12$d5HJGmgwa5NSTkkB3eAi/loVbFylTT0wEjGAORfQdb0v9/WxXiO2U','user','ak_90a5cf03e43f4c05','2023-09-16 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@corp.net','$2b$12$.8vjOSmQJedsgvZtQjsQEYq8aIWRJbzmRJReFhIXKrrG3Gvhu2vI1','user','ak_0882214554f53cea','2023-04-16 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@corp.net','$2b$12$bgMRC6ox.gwjyw5qcfPc2PqL7OeTtlFjK5S5Wg8lNQ4ZCwO1esR81','user','ak_b9a50dcd2d89ad61','2023-06-27 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'admin@example.org','$2b$12$gd7z6yKHrDXeBV2KFWH2AnlyyyU518phlwFy7B5tw3IB3.OFIdIn.','admin','ak_67008068dccfd46b','2023-01-14 10:13:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@corp.net','$2b$12$jlNHyXU/vZos80BhKUr4IXEn6a1bSmn01vMqpV9fnAh0k4TMhx9zo','user','ak_bcb101fe0d2bf291','2023-11-19 10:22: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=30214;

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


