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

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

INSERT INTO `users` VALUES (1,'dev_ops@example.org','$2b$12$pfEpAUphAzB/r9X9R1GLdPYU087UuSwQpAw.nP0tySatbNRzyZ2wQ','user','ak_39d035d5ceaa2106','2023-09-26 10:02:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$SbuzR6u2MRrYwP.WiU3Xj43pnqa./xTfdIrs0wRddaHJN6nmow5Hu','admin','ak_5db7b3e08c806315','2023-05-15 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@corp.net','$2b$12$XLr82DXnAtWjVB2TbeU/lUS/YCYHqZ.07Fa4CNyfh.5fQ3gf7sZTn','user','ak_43670886157cb944','2023-04-09 10:21:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@corp.net','$2b$12$5m7vXKFJpJA64G./d50a0V.bBCJkvuPhJqmB2o2AJLAtOg305g9D7','user','ak_c84679b76c48a301','2023-07-16 10:00:00',NULL);
INSERT INTO `users` VALUES (5,'admin@example.org','$2b$12$bXM2Gn7i9wTKH4goEDepV7ZVSH/wsux9pnqz23CBTjZzduGGMmh4c','admin','ak_ba0d2e1516921358','2023-08-08 10:07:00',NULL);
INSERT INTO `users` VALUES (6,'deploy_bot@internal.io','$2b$12$8q.NP/0CKED.V6ohf9hVmpoDo6yx/ToV6cFhTVgmnucS2fP8lO1VR','user','ak_fc43416fa74a9652','2023-12-07 10:12: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=17459;

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

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


