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

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


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

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

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

INSERT INTO `users` VALUES (1,'admin@corp.net','$2b$12$WPWcZm5ul/JqqCo0CylcG5QFLfRis3eGFBxXRbr5uqAGn184BlWme','user','ak_516a35866b37d2c5','2023-10-28 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@internal.io','$2b$12$e0QpfaThgq0ezploiGL2PRvCrRGo1CfW9rMRaWwyGoXWjd9KVFpeB','user','ak_21878b540f0f653e','2023-02-18 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@internal.io','$2b$12$5YWbOJMvoL25mHm9.4Cvh6DRNfNDyzsrkvhFFAypYFcPJozxP5azV','user','ak_0adcf1ede603d157','2023-11-13 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'root@example.org','$2b$12$Lx2UYc/MsSHXRgXk2xrsHbRUEWAQaQd1S5MR9YdJoPMLdxL5M3DOM','admin','ak_2c6e5a2ddbe58b84','2023-04-26 10:13:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@corp.net','$2b$12$5nGccBsG/RMWm.4bO2m5g3gpUeoyCaSIEToXoRB6pbEumgbL2pX2j','user','ak_2cf7f22c64ad2d27','2023-11-23 10:08:00',NULL);

