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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@internal.io','$2b$12$iEZ0eeCH6UXzkGto7wLfp5gxgSeFPNHF7G6AXSD7PwgAeyJTxNBCr','user','ak_cea8244b36f5f039','2023-11-13 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@internal.io','$2b$12$tJK4P/n71ye1uOQMSQnOOw97WbooXeruu5CkCB5tmheZqORz6dsET','user','ak_bf73806145644da8','2023-03-06 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'root@company.com','$2b$12$FuOhi5SSFHkj.iFCF04/4M.IGf4EEm.TqDIFb3A4B/a30hTFTpZ5g','user','ak_89c50bc43faf2194','2023-02-11 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@corp.net','$2b$12$Kr6unaSvsIRFx5y64.Md9RKdL6HhwwbmSPy05TgABlaymvhsVo3e3','user','ak_f07c96d7d9da8c0c','2023-04-24 10:08:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@corp.net','$2b$12$qfS69xx5Vndaa2ciYiMma5H7MLHOGQm3fZygYmM/uaVxjFwYyxphR','admin','ak_500735dfda62dbba','2023-11-19 10:23: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=42602;

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


