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

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

INSERT INTO `users` VALUES (1,'deploy_bot@example.org','$2b$12$7fAIznPUisShPRo19gKCAidlSdxiklN99qR2p5o/GIPOwFb65blfz','user','ak_a87762903fbed071','2023-03-10 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$0cr9kM5eA3w2fNnS5V2Jw.JV4RgC2EZ3Tc0rPsaLQtcv1JXtFo2vN','user','ak_da267f386c23e1a0','2023-01-25 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'admin@internal.io','$2b$12$fjXhQQAO0lc30LksSOBdEKuWJpdhkH6nTTuxfXYvBVPv5mIvnzgby','admin','ak_06a2e5e109ecf541','2023-11-04 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@example.org','$2b$12$ra1qi0wf3yrAkHVX8CLUR/R10JSIbENXYa3LiDpz5mQSVPLmSZ4Rm','user','ak_2bd877c251f3440c','2023-04-01 10:18:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@example.org','$2b$12$uvUGjOeK9508P4cazGn42OZxP0dQa2BGbrpvQmd86ykfrGZiMc6g4','user','ak_05ce4a4fe4b8381f','2023-04-19 10:22:00',NULL);
INSERT INTO `users` VALUES (6,'john.doe@example.org','$2b$12$ZXx8kck1ybrUcvCCw1Tvfu7gzoobYOM7dh.y/Y3KzmRB.6abREmdP','admin','ak_26d8c4167895ce5c','2023-06-11 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=41522;

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

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


