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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$gfmfSyQs/Qd1yfDDETMtKRHi7FCzi6k2S/IOQQCmooo9M01FM1RyE','user','ak_a3e0e2021912e7fe','2023-04-15 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'admin@example.org','$2b$12$LaxKGVbPzSArtfFjmZiiHtLt/emotNsOz76YqlO5LzV6laJLs1LXx','user','ak_51c924c6a024f008','2023-01-06 10:03:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@internal.io','$2b$12$C.zprwh/soCcbII3pWp6z19JBUUgh.V3WpcIwSNjKqla9PYbugCBJ','user','ak_35c7bab2d6d0a0c6','2023-10-15 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@corp.net','$2b$12$j/uhx6sBsSwi/yGV8xCVCf13RYGUX.DNysBdxCP0K8rBZ1cgy2vTs','user','ak_87ca10e484dc4db8','2023-09-02 10:16:00',NULL);

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

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

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


