-- Host: db-master-4.internal    Database: ecommerce


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

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

INSERT INTO `users` VALUES (1,'backup_admin@corp.net','$2b$12$hsegSYRiBJhzYWHSSs1wp7LF1ilq9Ey09UV6Rjo/kdNkA/mmS1NQA','user','ak_f68ebea2103622f7','2023-04-03 10:02:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@example.org','$2b$12$DHo5PmOh6ArNb3s.YrlNwPtlcSRzh1QgeqMcNH/2DNMzxbx8mQwoh','user','ak_ac8c96d92fcbbdb6','2023-09-16 10:13:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@company.com','$2b$12$9B3YfAgzUZVvsWOvhgLGUbxrmBz84MXMCpBk2cpmMRzxWcDtlXLvK','admin','ak_97e99b6b254260b1','2023-05-20 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'root@company.com','$2b$12$BCeI0leg4dGjUSR32fJ6ZtYf6d8mMe7cnQauZNTMTPUTjvDkW1yon','user','ak_ecc4e4990e2ef3db','2023-02-14 10:07:00',NULL);
INSERT INTO `users` VALUES (5,'admin@internal.io','$2b$12$hdZPxVwV6M82fDtl7uTe9tJIl8gpJ85zrye.S4alC98OCPd01PXgw','user','ak_22e06d3486dae23e','2023-04-25 10:00: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=37482;

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


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

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


