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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@example.org','$2b$12$SM035AjCEV7G.C4/HSQ5mSulwQcq0S7x5D5wZXcX8W6U7cBRH8hd1','user','ak_0aac91215279bc68','2023-11-15 10:08:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@internal.io','$2b$12$d4JqFjHRKOVVR3dhEVmVWYI/JGZV6ci1K3l4cgdiX4EbX0/psq0G0','user','ak_538a6fe424bab4c8','2023-01-09 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'root@example.org','$2b$12$m5y2IOqRnp8SppQ1Zow2NVD94yej3EsTdnDm5jw217CoTO4Kmv3kb','user','ak_97b6f95406c713f9','2023-09-15 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@internal.io','$2b$12$rWW0YkEidm/jIYMIVgI8EnnUsSTY.Xj6yBqT8.8Sh8MhyO3Njh6/.','user','ak_1a6c7ac57750cd5f','2023-06-04 10:12: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=30672;

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


