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

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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@corp.net','$2b$12$am.O3rqMGO0V6pB1SsRyzFfHob4K/6VEN8AxG8rdTgT/CLXZF6y5Y','user','ak_bbab6862f887d4c0','2023-01-25 10:11:00',NULL);
INSERT INTO `users` VALUES (2,'admin@internal.io','$2b$12$XOH66K6DmWKmLKnphwlweeMnqV0vFPtpcusfZ56quXm2SJNpKH0Pb','admin','ak_c9f5d8e27fa0c003','2023-05-07 10:12:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@corp.net','$2b$12$Yq/Wl9MHPsYIuym/BNWenSXY8W/.KT5i0GfF6mvazzYTdd8qy3GMa','user','ak_40bb1b2dcab0418c','2023-03-23 10:16:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@company.com','$2b$12$7C1TeGIV7cmooBItN4I5DfS/EEXZG48022tHE/g/5i0LWG.bxt4sr','admin','ak_4afd5fe155f6e389','2023-05-17 10:07:00',NULL);

