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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@company.com','$2b$12$xP9uJ4imsGvKXFq6bFQrmxqPYHHJRJ8pNqAzNeqp1W.5O49Xte8fv','user','ak_a8f47151c74c3eda','2023-02-07 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$bMuiqNDe5.MG4jumWwbv9YZO5uwbhnZuYeJdW1FSavVsM6Uo6a0BR','admin','ak_2db0e355d5cab3a9','2023-12-16 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@company.com','$2b$12$7LN87GCjj4cSMPUGUKCmeh5x5QaOOl4a7ntXDEuquTwqjI4vGzdDR','user','ak_98f17f31dbd26cb8','2023-05-17 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@example.org','$2b$12$8YSi6oyFA86KnArSJzhbrfpPxOckOBiZDvKf/ifJiTRoVk1T0zNyW','admin','ak_629efcc105027f2f','2023-03-28 10:19: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=36701;

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


